Commit Graph

437 Commits

Author SHA1 Message Date
Jeremy Pease
fab8cfdfc7 Add additional default fields to _Installation class (#1852)
Fields are appVersion, appName, appIdentifier, and parseVersion.
These fields are sent by Android and iOS SDKs.
2016-05-20 18:15:47 -07:00
Tyler Brock
9bad87905f Add MongoDB 3.2 to test matrix (#1842)
* Add MongoDB 3.2 to test matrix

 - Updated mongodb-runner to support specifying storage engine
 - Specifying mmapv1 explictly because of new 3.2 default

* Increase jasmine.DEFAULT_TIMEOUT_INTERVAL to 3 seconds

* Use fixed mongodb-runner

* Increase jasmine.DEFAULT_TIMEOUT_INTERVAL to 15 seconds

* Update to mongodb-runner 3.3.2 upon release
2016-05-20 14:18:41 -07:00
Drew
b2183680be Refactor cloud code tests (#1837)
* Move cloud code tests

* Remove _removeHook calls that are no longer necessary

* Use Strict
2016-05-19 13:38:16 -07:00
Hussam Moqhim
03108e6347 add support for http basic auth (#1706)
* add support for http basic auth

* update http auth per flovilmart feedback
2016-05-18 20:06:37 -07:00
Drew
4d4361451c Refactor MongoTransform.js (#1823)
* Split transformAtom into transfromTopLevelAtom and transformInteriorAtom

* Use single param for inArray and inObject

* Tidyness in transformKeyValue

* Add transformInteriorKeyValue

* Remove update from tranformInteriorKeyValue

* Split out transform update

* Move validation out of transfromUpdate

* Remove force paramater from transformTopLevelAtom throw error after if necessary

* Turn transformKeyValue into transfromKey since it is only used for that purpose

* Remove unnecessary stuff from transformKey

* convert transformKey to use parse format schema

* interior keys fixes

* Add test for interior keys with special names

* Correct validation of inner keys
2016-05-18 18:14:54 -07:00
Blayne Chard
8c09c3dae1 Adding Caching Adapter, allows caching of _Role and _User queries (fixes #168) (#1664)
* Adding Caching Adapter, allows caching of _Role and _User queries.
2016-05-18 12:12:30 +12:00
Marco Cheung
40965186c0 Mask sensitive information when logging (#1790) 2016-05-17 13:15:44 -07:00
Tyler Brock
3b4ae2d0a0 Write old ACL format in _acl in addition to new format (#1810) 2016-05-16 14:41:25 -07:00
Tyler Brock
1854928fe7 Add test to ensure you can set ACL in beforeSave (#1772) 2016-05-13 18:17:22 -07:00
Drew
e4998c256a Move field name validation logic out of mongo (#1752)
* Remove transformKey(...)

* Move validation logic into Parse Server and out of Mongo Adapter

* Fix nits
2016-05-13 15:28:14 -07:00
Marco Cheung
d0c3535a39 Fix error when unset user email (#1778) 2016-05-13 10:51:01 -07:00
Marco Cheung
19e7407f55 Return correct error when violating unique index (#1763) 2016-05-11 17:24:15 -07:00
North
6cfcb4ddf8 Fix #1755 (#1756)
* Add condition at limit = 0

* Add tests for installations with limit and count parameters
2016-05-11 15:22:29 -07:00
Drew
10ee229e60 Update dependencies and support node 6.1 (#1754)
* Update dependencies and support node 6.1

* Remove gcs-adapter, which depends on grpc, which fails to build on node 6

* Remove GCS adapter usage
2016-05-11 08:54:23 -04:00
Drew
e698f61a58 Handle null param in cloud code. Fixes #1472 (#1746) 2016-05-10 10:43:02 -07:00
Fosco Marotto
b2f36e192a Merge pull request #1644 from drew-gross/refactor-query-transform
Break dependency of deleteObjectsByQuery on schemaController
2016-05-09 11:21:22 -07:00
Steven Shipton
37c502bed0 Add config.expireInactiveSession to add support for non-expiring inactive sessions (#1536)
* Create non-expiring session when sessionLength is zero

* Introduce expireInactiveSessions setting
2016-05-06 12:50:45 -07:00
Steven Shipton
7c850fc1ad Fix for #1642 - copy query parameters to request body (#1687)
* Fix for #1642 - copy query parameters to request body

* Add missing request.query to pass test
2016-05-06 12:36:05 -07:00
Drew Gross
d4bd21fcbc remove schema from transformWhere 2016-04-26 10:20:17 -07:00
Drew Gross
a926712951 Start using parse format schema in transformQueryKeyValue 2016-04-26 10:12:45 -07:00
Drew Gross
ee8a3c94d5 No need to transform post-transform keys in mongo adapter 2016-04-25 20:42:19 -07:00
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
957b5927b1 Ignore _RevoableSession "header" that is sent by JS SDK. Fixes #1548. (#1627) 2016-04-25 15:52:21 -04:00
Drew
d33dd68cc5 Add revokeSessionOnPasswordReset option. Closes #1584 (#1597)
* Add revokeSessionOnPasswordReset option

* Fix nits
2016-04-22 18:21:50 -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
d49d539a81 _PushStatus uses proper Parse format (#1580)
* removes mongo style props from _PushStatus

* removes log

* Update MongoTransform.js

Removes _id case
2016-04-21 21:36:15 -04:00
Blayne Chard
6e9529f81c Exposes the loggerAdapter as log to Cloud Functions and Triggers (#1565)
This allows access to logging inside cloud code and triggers via
    request.log.info
    request.log.error
2016-04-21 16:20:14 -04:00
Florent Vilmart
2d94a885d2 regression test for #1554 2016-04-20 21:51:48 -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
b185508508 Remove flaky test
This test depends on external services and is super flaky. Lets kill it.
2016-04-20 19:03:56 -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
Florent Vilmart
59b4047de8 Defers the session creation after DB operation (#1561) 2016-04-20 11:57:38 -04:00
Drew
5d37755d88 Test facebook unlinking (regression test #1532) (#1538) 2016-04-20 00:31:15 -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
0708af17d7 Move "No two geopoints" logic into mongo adapter (#1491)
* Move "No two geopoints" logic into mongo adapter

* Semicolon
2016-04-18 17:10:30 -07:00
Drew
414ee6740d Regression test for #1489 (#1511) 2016-04-18 19:45:48 -04:00
Drew
ac839f75c7 Remove mongo object create format from Parse Server (#1516) 2016-04-18 12:45:48 -04:00
Seiji Akiyama
a727e1ccd3 Adds limit = 0 as a valid parameter for queries (#1493)
* Remove results if limit = 0;

* Adds tests for limit=0 and count=1.

* Improves readability.
2016-04-15 11:17:53 -07:00
Florent Vilmart
eef51cf9ad Hotfix for tests (#1503) 2016-04-14 17:25:02 -07: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
Drew
3fb3ce1ab7 Store collection prefix in mongo adapter, and clean up adapter interface (#1472) 2016-04-13 08:21:53 -04:00
Drew
512251eb58 Move field deletion logic into mongo adapter (#1471) 2016-04-12 22:06:58 -04:00
Florent Vilmart
f312f81cbd Adds support for Long and Double mongodb types (fixes #1316) (#1470)
* Adds support for Long and Double mongodb types (fixes #1316)

* Use bigger numbers
2016-04-12 21:19:47 -04:00
Florent Vilmart
af30f669cc Push status nits (#1462)
* Sets _id to objectId in _PushStatus (fixes #1457)

* _PushStatus stores serialized payload (fixes #1458)
2016-04-12 17:43:46 -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
73a3db44ab Fixes #1444 (#1451) 2016-04-11 11:27:55 -07:00
Drew
281568edd2 Fixes #1417
* Fixes #1417

* Cleanup

* Perf improvement

* Hoist constant array

* Improve tests
2016-04-08 19:06:52 -04:00