-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
useMasterKey in cloudCode not working as expected #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
And you're not requiring/defining Parse in your cloud code file, right? |
Yes, i don´t require Parse in my cloud code. Not using a valid session as well. Calling the function via curl with app-id set.
|
Another example for just making an query instead of creating an object on my local parse-server with a remote mongolab db (migrated via parse ui dashboard):
With parse-server 2.0.8 and index.js like this
|
@ktmatzdorf did you try report.save(null, { "useMasterKey": true }) with double quote instead? I am able to use master key in the cloudcode as following:
|
@mchun's example is correct. The session token or useMasterKey:true option must be passed to save/query calls, and the concept of the 'current' user does not function in node. |
Thanks @mchun this was helpful in my case! |
still getting an error with useMasterKey in save method (see #37 )
Error:
parse-server is 2.0.7. MasterKey is set in ParseServer
The text was updated successfully, but these errors were encountered: