Commit Graph

508 Commits

Author SHA1 Message Date
Florent Vilmart
025482ea1a Fix null relation problem (#2319)
* Add null check for relation type map.

For relations that are not explicitly defined in the schema, we need a null check here.

* Making change to force rebuild.

* Reverting change.

* Adds test
2016-07-18 22:58:37 -07:00
Florent Vilmart
f310e6678e Fix flaky tests (#2324)
* Fix flaky test (There were open connections to the server left after the test finished)

* fix test that's happening on the end of the minute

* remove focus testing
2016-07-18 21:43:34 -07:00
Sen Palanisami
7d234e054b Log objects rather than JSON strings and option for single line logs (#2028)
* Log objects rather than JSON strings and option for single line logs

This reverts commit fcd914bdfd.

* Better password stripping tests
2016-07-15 16:18:50 -04:00
Florent Vilmart
069275d3df Fix for #1840, Strip operations from results, forwards delete operations to SDKs (#1946)
* Adding a test demonstrating issue #1840.

* Fixes #1840

* Adds failing test with other use case

- That test fails on parse.com as well

* Bumps parse to 1.9.0

* exclude pg db

* Exclude pg on other test

* Adds clientSDK compatibility check for forward deletion

- Mark js1.9.0 as compatible

* Strips all operations from result

- fix for #1606
2016-07-15 09:24:53 -04:00
Florent Vilmart
9bf21ef093 Restores ability to include non pointer keys (#2263)
- Matches the behaviour on parse.com
- fixes #2262
2016-07-13 09:14:54 -04:00
Florent Vilmart
32f7230aca Creates a new sessionToken when updating password (#2266)
* Creates a new sessionToken when updating password

* Adds test ensuring email is properly sent when upgrading from anon
2016-07-13 07:18:24 -04:00
Nikita Lutsenko
18235352c4 Merge pull request #2259 from ParsePlatform/client-sdk-info
Exposes the ClientSDK infos if available
2016-07-12 11:17:52 -07:00
Greenkeeper
868ad5bdfd Update parse to version 1.9.0 🚀 (#2233)
* chore(package): update parse to version 1.9.0

https://greenkeeper.io/

* Removes Hooks client API as provided by node SDK
2016-07-12 10:09:16 -04:00
Florent Vilmart
2498a954ce Exposes clientSDK into RestQuery, RestWrite and rest 2016-07-12 10:06:13 -04:00
Florent Vilmart
a55466fde8 Fixes #2221: Nested Or queries (#2231)
* Adds repro for #2221

* Fixes nested or queries

* not for PG yet
2016-07-08 22:03:13 -07:00
Florent Vilmart
61aa5a8d62 Let auth data be updated on login (#2219)
* Let user update authData token upon login

* Adds tests that ensures linked authData isnt overriden

* fixes focused testing problem
2016-07-08 21:49:46 -07:00
Blayne Chard
8338783075 Adding more information to the permission denied error (#2210) 2016-07-07 11:30:29 -04:00
Tyler Brock
2f2ff377eb Better e-mail adapter testing (#2208) 2016-07-05 12:08:46 -07:00
Diwakar Cherukumilli
08c63f324a Adds ability to prevent login with unverified emails (#2175) 2016-07-04 13:56:35 -04:00
Steven Shipton
d1cdea00af Expose InMemoryCacheAdapter. Update tests (#2186) 2016-07-02 06:08:13 -07:00
Tyler Brock
799e59618c Stop requiring verifyUserEmails for password reset functionality (#2166) 2016-06-28 22:25:44 -04:00
David Keita
19080ed7e7 #506 fix: Deleting a file does not delete from fs.files (#1758)
* #506 fix: Deleting a file does not delete from fs.files

* test added to check that GridStoreAdapter deleteFile removes from fs.files and fs.chunks
2016-06-27 00:40:43 -04:00
Florent Vilmart
147b493e23 Results invalid session when providing an invalid session token (#2154)
* Results invalid session when providing an invalid session token

* Reverts unsafe loggers

* Fixes failing tests

- The tests were failin when run in sequence as we called done() before the JSSDK had a chance to register the session token, therefore having a proper logout call in afterEach
2016-06-26 23:20:02 -04:00
Hussam Moqhim
a861c4e506 Fix issue #2134: creating an anonymous user (#2155)
* fix issue #2134

* username is returned only when generated

* fix unit tests

* incorporate @flovilmart review
2016-06-26 23:19:37 -04:00
Florent Vilmart
3e413683f7 Makes HTTPResponse serializable (#2143)
* Use the callback body instead of response.body that may not be set

* Adds test to handle undefined responses

* Adds toJSON method to properly serialize HTTPResponse

* Use ES5 defineProperty to make keys enumerable

* removes body key from serialization

* Indent nits
2016-06-25 10:56:02 -07:00
Drew
006540cda5 Implement pointer types in postgres. (#2086)
* Support pointers in postgres

* implement count

* Fix bug in createClass
2016-06-17 11:09:42 -07:00
Drew
ab06055369 Postgres exclude failing tests (#2081)
* reload the right data

More passing postgres tests

Handle schema updates, and $in for non array columns

remove authdata from user and implement ensureUniqueness

Make some tests work, detect existing classes

Throw proper error for unique index violation

fix findOneAndUpdate

Support more types

support more type

Support boolean, fix _rperm/_wperm, add TODO

Support string types and also simplify tests

Move operator flattening into Parse Server and out of mongo adapters

Move authdata transform for create into Parse Server

Move authdata transforms completely in to Parse Server

Fix test setup

inline addSchema

Inject default schema to response from DB adapter

* Mark tests that don't work in Postgres

* Exclude one more test

* Exclude some more failing tests

* Exclude more tests
2016-06-17 12:59:16 -04:00
Drew
0ff35e18f0 Add more postgres support (#2080)
* reload the right data

More passing postgres tests

Handle schema updates, and $in for non array columns

remove authdata from user and implement ensureUniqueness

Make some tests work, detect existing classes

Throw proper error for unique index violation

* fix findOneAndUpdate
2016-06-16 15:39:05 -07:00
Fosco Marotto
d1f77a9a98 Merge pull request #2053 from drew-gross/postgres-3
Continue with postgres support
2016-06-16 10:19:07 -07:00
Blayne Chard
2eb861db66 Fixing typo in _loadRoles which prevents caching of roles. (#2063) 2016-06-15 22:22:23 -07:00
Drew
726c866a4d Remove console.log 2016-06-15 17:25:17 -07:00
Drew
9ed3fcc536 Remove duplicate test 2016-06-15 17:23:29 -07:00
Drew Gross
a69a88f3a4 Fix some stuff 2016-06-15 13:11:51 -07:00
Drew Gross
f796d69d19 Move $options validation into Parse Server 2016-06-15 13:11:51 -07:00
Drew Gross
452b737be4 WIP 2016-06-15 13:11:51 -07:00
Drew Gross
634d672ad1 passing another test 2016-06-15 13:11:51 -07:00
Drew Gross
803b9be97a Add unique indexing for username/email
WIP

Notes on how to upgrade to 2.3.0 safely

index on unique-indexes: c454180 Revert "Log objects rather than JSON stringified objects (#1922)"

reconfigure username/email tests

Start dealing with test shittyness

most tests passing

Make specific server config for tests async

Fix more tests

Save callback to variable

undo

remove uses of _collection

reorder some params

reorder find() arguments

finishsh touching up argument order

Accept a database adapter as a parameter

First passing test with postgres!

Fix tests

Setup travis

sudo maybe?

use postgres username

reorder find() arguments

Build objects with default fields correctly

Don't tell adapter about ACL

WIP

Passing postgres test with user

Fix up createdAt, updatedAt, nad _hashed_password handling
2016-06-15 13:11:51 -07:00
Drew Gross
f75c8b3a4d index on unique-indexes: c454180 Revert "Log objects rather than JSON stringified objects (#1922)"
reconfigure username/email tests

Fix broken cloud code

Save callback to variable

undo

Fix all tests where connections are left open after server closes.

Fix issues caused by missing gridstore adapter

remove uses of _collection

reorder find() arguments

Accept a database adapter as a parameter

sudo maybe?

use postgres username

reorder find() arguments

Build objects with default fields correctly

Don't tell adapter about ACL

WIP
2016-06-15 13:11:51 -07:00
Marco Cheung
b2a5092627 Endpoint for purging all objects in class (#2032)
* Endpoint for purging all objects in class

* Use deleteObjectsByQuery

* Standalone handling function and purge cache

* Change endpoint url
2016-06-14 15:52:49 -07:00
Marco Cheung
d9f8486790 Fix role test (#2057) 2016-06-14 10:17:15 -07:00
Marco Cheung
7c8ad7e071 Throw error when push is missing configuration (#2035) 2016-06-13 09:26:02 -07:00
Marco Cheung
0ec78d478b Fix checking existent class for allowClientClassCreation (#2051) 2016-06-13 09:21:52 -07:00
Drew
5518edc2a5 Postgres adapter (#2012)
* Remove adaptiveCollection

* Remove an adaptiveCollection use

* Remove an adaptiveCollection

* make adaptiveCollection private

* Remove collection from mongoadapter

* Move schema collection usage into mongo adapter

* stop relying on mongo format for removing join tables

* reduce usage of schemaCollection

* remove uses of _collection

* Move CLP setting into mongo adapter

* remove all uses of schemaCollection

* make schemaCollection private

* remove transform from schemaCollection

* rename some stuff

* Tweak paramaters and stuff

* reorder some params

* reorder find() arguments

* finishsh touching up argument order

* Accept a database adapter as a parameter

* First passing test with postgres!

* Actually use the provided className

* index on unique-indexes: c454180 Revert "Log objects rather than JSON stringified objects (#1922)"

* Start dealing with test shittyness

* Make specific server config for tests async

* Fix email validation

* Fix broken cloud code

* Save callback to variable

* undo

* Fix tests

* Setup travis

* fix travis maybe

* try removing db user

* indentation?

* remove postgres version setting

* sudo maybe?

* use postgres username

* fix check for _PushStatus

* excludes

* remove db=mongo

* allow postgres to fail

* Fix allow failure

* postgres 9.4

* Remove mongo implementations and fix test

* Fix test leaving behind connections
2016-06-12 16:35:13 -07:00
Drew
d559cb2382 Move transform acl (#2021)
* Move ACL transforming into Parse Server

For the database adapters, it will be more performant and easier to work with _rperm and _wperm than with the ACL object. This way we can type it as an array and so on, and once we have stronger validations in Parse Server, we can type it as an array containing strings of length < x, which will be much much better in sql databases.

* Use destructuring
2016-06-12 13:39:41 -07:00
Drew
7e868b2dcc Unique indexes (#1971)
* Add unique indexing

* Add unique indexing for username/email

* WIP

* Finish unique indexes

* Notes on how to upgrade to 2.3.0 safely

* index on unique-indexes: c454180 Revert "Log objects rather than JSON stringified objects (#1922)"

* reconfigure username/email tests

* Start dealing with test shittyness

* Remove tests for files that we are removing

* most tests passing

* fix failing test

* Make specific server config for tests async

* Fix more tests

* fix more tests

* Fix another test

* fix more tests

* Fix email validation

* move some stuff around

* Destroy server to ensure all connections are gone

* Fix broken cloud code

* Save callback to variable

* no need to delete non existant cloud

* undo

* Fix all tests where connections are left open after server closes.

* Fix issues caused by missing gridstore adapter

* Update guide for 2.3.0 and fix final tests

* use strict

* don't use features that won't work in node 4

* Fix syntax error

* Fix typos

* Add duplicate finding command

* Update 2.3.0.md
2016-06-10 20:27:21 -07:00
Dan Huang
11301d9590 Fix an issue in MongoTransform where transforming object type fields with null values fails (#2029) 2016-06-10 13:44:41 -07:00
Marco Cheung
2e50416cba Recursive parse date in cloud function (#2014)
* Recursive parse date in cloud function

* Use _.mapValues
2016-06-09 12:37:05 -07:00
Drew
fcd914bdfd Revert "Log objects rather than JSON stringified objects" (#1995) 2016-06-08 10:11:08 -07:00
Patrick Pelletier
65518cdd64 Support file objects in the legacy bucket: files.parse.com 2016-06-07 15:59:45 -07:00
Florent Vilmart
e7e2369132 Fixes for Class Level and Pointer Permissions (#1989)
* Fixes for Pointer Permissions

- Fix bug that would leave public CLP when setting a new set of permissions
- Sets empty permissions if missing to match parse.com API
- Updates tests to reflect changes

* Adds regression test for #1991

* Fit -> It
2016-06-06 09:31:50 -07:00
Drew
aeb6880b85 Allow installation get (#1980) 2016-06-04 12:37:15 -04:00
Sen Palanisami
bea655e61b Log objects rather than JSON stringified objects (#1922) 2016-06-01 18:35:54 -07:00
Jeremy Pease
c6c9c97b54 Allow custom error codes with response.error from Cloud Code functions and before/after hooks (#1955) 2016-06-01 10:28:06 -04:00
Tyler Brock
04172eda5a Strip read only fields from serialized beforeSave response objects (#1964) 2016-05-31 17:00:41 -07:00
Florent Vilmart
5176efbe16 Patch failing delete (#1960)
* Patch failing delete

* Fixing unit test
2016-05-31 13:42:56 -07:00