Commit Graph

148 Commits

Author SHA1 Message Date
Florent Vilmart
0542f860f4 Test case to ensure dashboard.parse.com won't break (#1636)
* Test case to ensure dashboard.parse.com won't break

* Adds volatile classes concept for _PushStatus

* Fixes test
2016-04-25 21:33:11 -04:00
Drew
234d0093ff Cleanup delete schema (#1604)
* Some cleanup for deleting one schema

* tidyness

* Remove _allCollections as Parse Server doesn't need it.
2016-04-25 14:47:57 -04:00
Drew
d14d451028 Move acl adding into parse server (#1601)
* Move writeACL knowledge out of mongoAdapter

* Remove write ACL from mongo adapter

* Remove readACL from Mongo Transform
2016-04-22 21:44:03 -04:00
Drew
0d094767cf Cleanup update (#1590)
* destructuring in DB controller

* deleteObject in db adapter

* Turns out we can't have delete by object ID because of ACLs...

* Fix tests

* destructure acl

* Don't reject with object
2016-04-22 17:05:21 -04:00
Florent Vilmart
b7b57f7ea7 Adds support for Pointer Permissions
* WIP: Initial pointer permissions

* Process Pointer perms when no matching CLP are found

* Additional tests with read lockdown

* Create operation lockdown with pointer permissions,

on parse.com, when an class is locked down with write pointer perm, users can't create objects even if they set their own as the pointer permission key

* Adds test case for multiple write PointerPerms

* Adds validation for pointer permissions when setting

* Adds tests for validating pointer permissions column types

* Adds tests for complex ACL/CLP/PP hierarchy

* Restores power of the master

* Adds validation of borked fields

* Adds complex test for find

* Adds more variations around PointerPermissions tests
2016-04-20 21:51:11 -04:00
Drew
7b91ee98ed Fixes #1568 (#1574) 2016-04-20 18:42:18 -04:00
Drew
9776362ab2 Begin isolating object creation code into an externalizable API. (#1569)
* Tidy up transformKeyValue

* Specialize transformKeyValue for object creation

* remove keys that never appear in creation requests

* rename function

* remove local var

* early exit for simple keys

* Refactor create

* Force class creation when creating an object

* Pass parameters to key value transformer

* No need to check for array in this func

* start using Parse Format schema in MongoTransform

* Remove call to getExpectedType

* add tests to ensure client can't see _PushStatus
2016-04-20 13:35:48 -07:00
Drew
bf47a0b2b6 Remove acceptor parameter (#1553) 2016-04-19 14:29:05 -07:00
Drew
61b62e4e9f Rename Schema => SchemaController (#1542)
* Rename Schema to SchemaController

* Rename Schema => SchemaController

* Move to controllers folder

* Move SchemasController to Controllers folder

* remove ./..
2016-04-18 18:59:57 -07:00
Drew
cecb2a1cb1 Move 'ns not found' into mongo adapter. (#1541) 2016-04-18 17:06:51 -07:00
Drew
ab0ea09067 Schema.js cleanup (#1540)
* Tidy up schemas router

* de-duplicate logic for injecting default schemas

* Remove no-op promise

* use hasClass

* Make getAllSchemas part of SchemaController

* Move getOneSchema logic onto schema controller

* remove log
2016-04-18 17:06:00 -07:00
Drew
ac839f75c7 Remove mongo object create format from Parse Server (#1516) 2016-04-18 12:45:48 -04:00
Florent Vilmart
1023baf20d DBController refactoring (#1228)
* Moves transform to MongoTransform

- Adds ACL query injection in MongoTransform

* Removes adaptiveCollection from DatabaseController

- All collections manipulations are now handled by a DBController
- Adds optional flags to configure an unsafe databaseController for direct
  access
- Adds ability to configure RestWrite with multiple writes
- Moves some transfirmations to MongoTransform as they output specific code

* Renames Unsafe to WithoutValidation
2016-04-14 19:24:56 -04:00
Tyler Brock
d57e384dcb Apply credential stripping to all untransforms for _User (#1498) 2016-04-14 14:50:16 -07:00
Drew
fc1cdd4408 Remove collection prefix and default mongo URI (#1479)
* Remove collection prefix from DB Controller

* Remove collection prefix from cache

* Revert "Remove collection prefix from cache"

This reverts commit 529d67dd617b64c69c36a8a63382456e95edcab8.

* Remove knowledge of default mongo URI from Parse Server

* Remove adaptive collection paramater from deleteFields

* Tidy up DBAdapter.js
2016-04-13 19:45:07 -04:00
Florent Vilmart
c050a65d49 Schema.js database agnostic (#1468)
* Schema.js database agnostic

* nits
2016-04-12 17:39:27 -04:00
Florent Vilmart
0e3636d880 Make notEqual work on relations
*  regression tests for #1349

* 🎉 fixes #1349

* Adds support for multiple constraints on the same key
2016-04-04 11:05:03 -07:00
Florent Vilmart
f0ebb7bae6 Merge pull request #1295 from drew-gross/test-1259
Fixes #1271
2016-03-30 23:14:17 -04:00
Drew Gross
73bca3b64c Improve comments 2016-03-30 19:48:33 -07:00
Drew Gross
6311c95785 Fixes #1271 2016-03-30 19:35:54 -07:00
Florent Vilmart
5d99075663 Properly let masterKey add fields 2016-03-30 20:27:12 -04:00
Florent Vilmart
e1c475512c Returns updated keys when running with beforeSave 2016-03-16 23:48:52 -04:00
Florent Vilmart
ba545fbf59 Returns full modifications on PUT 2016-03-16 22:30:52 -04:00
Florent Vilmart
e75d233b7e Adds validation of addFields 2016-03-09 19:33:48 -05:00
Nikita Lutsenko
d86f0a8c69 Use schema collection instead of adaptive collection for all schema operations. 2016-03-09 15:21:29 -08:00
Nikita Lutsenko
2730398b92 Add new MongoSchemaCollection class that manages schemas for all collections. 2016-03-09 15:20:59 -08:00
Nikita Lutsenko
b9f08d9694 Do not mutate parameter object in DatabaseController. 2016-03-08 16:08:41 -08:00
Nikita Lutsenko
fb5b8fb58f Migrate Schema.js to adaptive mongo collection. 2016-03-08 00:53:51 -08:00
Nikita Lutsenko
a163327ac9 Remove usages of non-adaptive collection inside DatabaseController. 2016-03-08 00:53:51 -08:00
Nikita Lutsenko
f2ead46580 Remove .rawCollection method from DatabaseController. 2016-03-07 17:22:27 -08:00
Florent Vilmart
5cdcadea36 Fixes bug when querying equalTo on objectId and relation
- Adds $eq operator in transform
- Makes $eq operator on objectId when adding $in operator
2016-03-07 08:26:35 -05:00
Fosco Marotto
4ee9cb754c Fix for related query on non-existing column 2016-03-06 00:34:44 -08:00
Florent Vilmart
907a05c57a Sanitize objectId in
- if objectId is set in query, move it to $in array
- refactors to addInObjectIdsIds
2016-03-03 10:58:09 -05:00
Drew
2cc9600604 Merge pull request #785 from flessard/master
Fix : remove query count limit
2016-03-02 20:10:22 -08:00
Florent Vilmart
dac71019b6 Merge pull request #769 from ParsePlatform/flovilmart.fixFailingQueries
Adds support for multiple $in, pointer / relation queries on $or
2016-03-02 22:15:37 -05:00
Francis Lessard
f3b7138269 Fix : remove query count limit
Remove the limit on query count. By default the limit is 100. If you
try to get the count of a collection and the collection has more than
100 rows, the result is always 100.
2016-03-02 21:34:17 -05:00
Florent Vilmart
d872f52eff backbone style is BAD! 2016-03-02 20:37:45 -05:00
Florent Vilmart
43f014a47d nits 2016-03-02 15:16:48 -05:00
Florent Vilmart
3629c40036 Adds support for or queries on pointer and relations 2016-03-02 14:33:51 -05:00
Florent Vilmart
27815b18aa Adds support for multiple $in 2016-03-02 12:01:49 -05:00
Nikita Lutsenko
4049ce4102 Move DatabaseController to use new findOneAndUpdate. 2016-03-02 00:29:20 -08:00
Nikita Lutsenko
abde9484ce Use adaptiveCollection for main find/count inside DatabaseController. 2016-03-01 22:36:23 -08:00
Nikita Lutsenko
2733c0924b Remove direct mongo access from Schema.spec.js. 2016-02-29 19:47:08 -08:00
Nikita Lutsenko
028ef2a7b2 Remove dependency on raw mongo from SchemaRouter.delete. 2016-02-29 19:47:08 -08:00
Nikita Lutsenko
eb892830e6 Move and cleanup getting collections into MongoStorageAdapter. 2016-02-29 12:51:43 -08:00
Nikita Lutsenko
7215300c1e Move Mongo database property directly to mongo adapter. 2016-02-29 12:50:47 -08:00
Nikita Lutsenko
997da898eb Split mongodb connection creation from DatabaseController. 2016-02-29 12:50:47 -08:00
Nikita Lutsenko
d78c2746e9 Rename ExportAdapter to DatabaseController. 2016-02-29 12:50:47 -08:00