-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Parse Server Cloud Code - Destroy with masterKey #910
Comments
Can you add some logging to the destroy call to determine what the error message it? |
I found that when I set the CLP write permission to public it is working, but when I remove the write permission, it is not. Am I using the "useMasterKey" wrong? Actually the read permission will be public, but the write permission wont be. |
No, that should be the correct way to use master key. Can you check if the error from the |
Hello drew-gross, I tried to add the error log as below, and see the error, but it somehow started to work:) I guess it is because I removed the "null" part in the destroy while adding the success and error logs.
|
I realize this was closed, but I came across the same issue and can confirm that removing null solved the problem. If the class has a restricted CLP in place this works: object.destroy({useMasterKey: true}); but this does not: object.destroy({null, useMasterKey: true}); |
Same here....had to remove the null. user.destroy(null, {useMasterKey:true}); // Does not work |
That makes sense, as the first parameter of If you look at the documentation for Whereas the |
Hello,
I am trying to delete an object with the code below, but I tried lots of things and could not make it work. Am I doing something wrong in the code below?
The text was updated successfully, but these errors were encountered: