* Handle local push time
* PR feedback
* Improve timezone detection with regex
* Use indexOf instead of endsWith
* Add documentation
* Add end to end test for scheduled pushes in local time
* Revert changes to npm-git script
* clean up
* Makes sure we don't override roles
* Reduces the query size whith pointer permissions
- Does not return as $and if not needed
- Returns just the query with the additional constraint
* Do not use $in if include is just of length 1
* removes costly json serialization to InMemoryCacheAdapter
* Always cache a copy of the array
* Use own mapValues
* Makes sure we dont make unnecessary calls to the logger
* Do not bypass loggers with silent logging (only applies to stdout)
* warn is not warning
* use ===
* Wrap logRequest / logResponse in the loggerController for more granular control
Also give the ability to pass functions to the logger so we don't serialize too early in JSON (costly)
* reconfiguring winston would override the transports levels and make subsequent tests fail
* Adds test for stalled pushStatus when audience is empty
* fixup! Adds test for stalled pushStatus when audience is empty
* Do not enqueue when count is 0, enforce deviceToken exists, stop badge ordering
* Added type polygon to schema
* refactoring and more tests
* fix tests
* update test and transform
* add support for polygonContains
* fix transform.mongoObjectToParseObject test
* add indexes for polygon
* index test
* postgres test fix
* remove invalid loop test
* add invalid loop test
* nit
When user resets his password, he does it by filling his email. But often he could also not remember his username, which he needs for logging in. I think it's better to include the username in the password reset email, what do you think?
* Adds back _JobSchedule as volatile class
* wip
* Restores jobs endpoints for creation, update and deletion
* Adds tests
* Fixes postgres tests
* Enforce jobName exists before creating a schedule
* Full Text Support
* invalid input test
* Support for sort
* index exist test
* clean up
* better error messaging
* postgres support
* error instructions for $diacritic and $case sensitivity
* nit
* nit
* nit
* separate test for full text
* Use RestWrite when verifying emails so hooks are called (as master)
* Fixes tests for postgres
* nit
* Makes rest.update support a full where instead of objectId
* Use rest.update to guaranteed proper beforeSave and liveQuery calls
* Fixes#3717
This fixes PR #3717. Sending push with parse-server@2.4.0 returns error
504 GATEWAY_TIMEOUT. This happens when push_time is not set (default).
* Fix lint issues
* Fix in PushController and add tests
Add a test to check push_time format and if it should schedule push
when the parse-server is configured
* -Defines new public API route /apps/:appId/resend_verification_email that will generate a new email verification link and email for a user identified by username in POST body
-Add template and url support for invalidVerificationLink, linkSendSuccess, and linkSendFail pages. The invalidVerificationLink pages includes a button that allows the user to generate a new verification email if their current token has expired, using the new public API route
-All three pages have default html that will be functional out of the box, but they can be customized in the customPages object. The custom page for invalidVerificationLink needs to handle the extraction of the username and appId from the url and the POST to generate the new link (this requires javascript)
-Clicking a link for an email that has already been verified now routes to the emailVerifySuccess page instead of the invalidLink page
* Fix package.json repo url to be parse-server againwq
* Fix js lint issues
* Update unit tests
* Use arrow functions, change html page comments, use qs and a string template to construct location for invalidVerificationLink page, syntax fixes
* Remember to pass result when using arrow function
Mongo has a hard limit on 1 $near operation per query. Restructuring to
avoid SERVER-13732 should not invalidate a query by creating multiple
$near operations.
Additionally, queries with multiple $ors are now recursively handled,
whereas before, ops at the top level would only have been pushed one
level deeper.
https://github.com/parse-community/parse-server/issues/3767
* Add support for push scheduling
Add a configuration flag on the server to handle the availability of
push scheduling.
* Update push controller to skip sending only if scheduling is configured
Only skip push sending if scheduling is configured
* Update bad conventions
* Add CLI definitions for push scheduling
* Adds tests for pushTime
* Adds test for scheduling
* nits
* Test for not scheduled
* Adds index on _Role name property
In order to avoid having different _Role objects with the same name, adding an index on the name property of _Role is necessary.
Fixes#3579
* Uses throw instead of Promise.reject when enforcing unique indexes
* Fixes wrong sorting of results in schemas tests
In a prior commit, improvements were made to the addition of `_rperm`
in the case of `$or` queries, to avoid MongoDB bug SERVER-13732.
As the vast majority of $or queries previously hit this bug due to the
presence of `_rperm` on most Parse queries), the present solution
avoids the bug and improves query performance in most cases.
However, it's still possible for clients to supply their own queries
which hit that bug, such as those with `_created_at` or `_updated_at`
filters, or their own properties from their data model.
This commit makes the logic currently present for `_rperm` available
to all top level filters that exist alongside an $or query, meaning
SERVER-13732 should be avoided in all cases where keys at the top and
inner levels do not have name clashes.
- https://github.com/ParsePlatform/parse-server/pull/3476
- https://jira.mongodb.org/browse/SERVER-13732
MongoDB has an unfixed bug in all supported versions 2.6-3.4 which
results in suboptimal index usage for `$or` queries when the query has
implicit `$and`s at the query root.
When adding `_rperm` to `$or` queries, Parse accidentally creates
queries which hit this bug.
The fix in this commit applies the suggested workaround of putting the
`_rperm` property inside all `$or` subdocuments, moving it from the top
level and leaving `$or` as the only top-level operator.
MongoDB Bug Link: https://jira.mongodb.org/browse/SERVER-13732
* Update status through increment
* adds support for incrementing nested keys
* fix issue when having spaces in keys for ordering
* Refactors PushController to use worker
* Adds tests for custom push queue config
* Makes PushController adapter independant
* Better logging of _PushStatus in VERBOSE
* Add parseFrameURL for masking user-facing pages.
Allow users to specify a different address which is used to mask parse
requests for verifying email and resetting password. This is how Parse.com
used to allow customers to gain control over page content, styling etc.
On the destination page javascript is used to check the link in the request
and embed the parse server page using IFRAME.
* Fix code indentation
* Rename method for building link and pass config to it.
* Add customPages options to README.md.
* Add tests for parseFrameURL email link building, and parseFrameURL option.
* Add parseFrameURL for masking user-facing pages.
Allow users to specify a different address which is used to mask parse
requests for verifying email and resetting password. This is how Parse.com
used to allow customers to gain control over page content, styling etc.
On the destination page javascript is used to check the link in the request
and embed the parse server page using IFRAME.
* Fix code indentation
* Rename method for building link and pass config to it.
* Add customPages options to README.md.
* Don't Object.assign to defaultConfiguration global
1. Add no space in paren rule
2. fix spec/eslintrc.json so it allow for inheriting from root rc.
Because the spce rc specified reccomended, it "turned off" all of the
rule tweaks in the root. This fixes that.
* adds resetTokenValidityDuration setting
* adds a validator to validate password that can be used to enforce strong
passwords
* adds unit tests for passwordPolicy.validator
* adds unit tests to to fail reset password function if password is not in a valid format
* updates README.md for passwordPolicy
* prevents duplicate check for password validator in updateUserPassword
* adds optional setting to disallow username in password
* updates test cases to use fdescribe instead of describe
* updates test cases to use request-promise instead of request
* adds ability to use a RegExp or Callback function or both for a passwordPolicy.validator
* expect username parameter in redirect to password_reset_success
* adds support for _perishable_token_expires_at in postgres
* Add option to reuse database controller between requests. Clear schema cache when deleting everything
* Add test
* Rename setting to persistSchemaCache to more accurately reflect effect
* Repurpose option to determine whether to randomize cache prefix. Restore Config.js controller creation. Add tests
* Fix bug with missing parameter passed to to SchemaCache
* Renaming and formatting
* Fix property name typo
* Rename option to avoid double negative and still be falsey by default. Style fix