Commit Graph

418 Commits

Author SHA1 Message Date
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
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
Florent Vilmart
b433fb9b4e Prevents _User lock out when setting ACL on signup or afterwards (#1429) 2016-04-08 13:19:41 -04:00
Steven Shipton
30197a7d84 Expose DatabaseAdapter to simplify application tests (#1121)
* Move helper.clearData to DatabaseAdapter. Expose DatabaseAdapter in index

* fix indentation

* Export DatabaseAdapter in index.js

* Rename clearData to destroyAllDataPermanently. Only export destroyAllDataPermanently from DatabaseAdapter. Update helper

* Expose wrapped TestUtils from index.js. TestUtils exposed select functions from other modules, only in test environment
2016-04-08 10:00:16 -07:00
Florent Vilmart
a770c4cba8 Adds relation fields to objects 2016-04-08 07:42:02 -04:00
Florent Vilmart
c22bafb951 Sets the defaultSchemas keys in the SchemaCollection (#1421)
* Sets the defaultSchemas keys in the SchemaCollection

* Moves defaultSchema injection logic to router

* maps outside the function

* fixes test

* conciseness
2016-04-07 22:13:07 -04:00
Florent Vilmart
bc96f0beb1 Adds X-Parse-Push-Status-Id header (#1412)
* Adds X-Parse-Push-Status-Id header

* Waits for _PushStatus to be stored
2016-04-07 18:08:09 -04:00
Blayne Chard
616ac71623 Untransform should treat Array's as nested objects (#1416) 2016-04-07 14:43:48 -07:00
Drew
91ace4e718 Progres towards moving mongo logic into its adapter 2016-04-05 21:16:39 -07:00
Florent Vilmart
cbbd66964a Huge performance improvement on roles queries 2016-04-05 20:44:26 -04:00
Florent Vilmart
1eb2a87f9f Removes GCS Adapter from provided adapters
* 💣 removes exposed GCS files adapter

- Should fix problems with GCS
- Throws error that shows the right repo
2016-04-05 18:18:49 -04:00
Florent Vilmart
5773143973 Disables find on installation from clients
- fixes #1372
2016-04-05 13:09:40 -04:00
Blayne Chard
18906f17b4 Auth._loadRoles should not query the same role twice. 2016-04-04 21:32:41 -04:00
Florent Vilmart
8c92b80b8f Improves config loading and tests 2016-04-04 20:02:34 -04:00
Florent Vilmart
91de7504fe 🎉 fixes #1288
*  regression test for #1288

* 🎉 fixes #1288
2016-04-04 14:27:11 -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
Drew
89df778ac8 Merge pull request #1357 from ParsePlatform/schema-defaults
🚧 Inject the default schemas properties when loading it
2016-04-04 08:56:41 -07:00
Tommy Goode
acc23d0828 Fix for #1334: using relative cloud code files broken
* Adding tests for absolute and relative cloud code file loading.

* Fixes #1334 by resolving relative cloud code file paths to the process' working directory.
2016-04-04 08:43:06 -04:00
Florent Vilmart
3a28352c96 🎉 fixes #1355
- injects default schema upon schema load
2016-04-04 08:36:40 -04:00
Jeremy May
f99b5588ab Added session length option for session tokens to server configuration 2016-04-02 11:36:47 -04:00
Fosco Marotto
8c12f80d28 Merge pull request #1269 from ParsePlatform/flovilmart.reportPushError
Improves report for Push error in logs and _PushStatus
2016-04-01 13:42:01 -07:00