-
-
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
acl.setRoleReadAccess("admin", true); doesn't work in parse server afterSave triger #3272
Comments
Thanks for your question! We want to make sure to keep signal strong in the GitHub issue tracker – to make sure that it remains the best place to track issues that affect the development of Parse Server. Questions like yours deserve a purpose-built Q&A forum. Would you like to post this question to Stack Overflow with the tag #parse.com? We'll be happy to answer there. Post a link to your Stack Overflow question here, so that we don't lose track of it. You may also use Server Fault for questions about managing your own servers. |
@ArMouReR did you ever solve your issue? I have a very similar problem (see this SO post) and would be very thankful if you could share your solution. |
Can you provide the server logs or is it a JS SDK issue? |
Here's the log entry showing the error:
The code responsible for this error looks like this:
The
NOTE: an interesting discovery I made after hours of digging & debugging is that when I don't import the object type
|
My code that works right now on Parse server:
` |
@ArMouReR Thanks! The new (working) code looks almost identical to the old (problematic) code in your original post, so I guess the code itself is ok -- the problem must be related to some contextual issue that you somehow solved. Heads up for fixing your bug, I hope I get mine fixed as well :) |
@flovilmart In case you are still interested: the issue was caused by having |
Ok, maybe related to side effects of having parse global. I believe in test environments, you should disable the single instance per object: http://parseplatform.org/Parse-SDK-JS/api/v1.11.0/Parse.Object.html#.disableSingleInstance |
Issue Description
Here is my code of user afterSave that worked in hosted server
Adding admin role to asl generated the following error:
Error generating response. TypeError: Tried to create an ACL with an invalid permission type.
If I remove admin role addition everything works as expected.
The text was updated successfully, but these errors were encountered: