-
-
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
Master-Key-Only Role can be edited from the client JS SDK #3835
Comments
Can you provide the ACL from the dashboard on the Role ? Or the logs when running the server with VERBOSE=1? |
So it's actually throwing an error in the logs but the user still gets added to the Role
|
Added on the client or also in the DB? |
that's odd indeed. |
Just written that small test:
And it's passing. |
I ran your test and it passed as well. It seems the issue shows up when I set the id of the role directly like this:
|
Uhm I found something. Will get back to you soon |
* Adds test for 3835 * Makes sure we run relational updates AFTER validating access to the object * Always run relation udpates last
Issue Description
Using
role.getUsers().add(user)
on a master-key-only Role will still add the user. Also produces the same result with a read-only Role. I've tried to replicate this on the User class and a custom class but the ACL's on those classes seem to be working as intended.Steps to reproduce
var user = new Parse.User()
user.id = <user ID to add to role>
var role = <Master-Key-Only Role object>
role.getUsers().add(user)
role.save()
Expected Results
The user should not be added to the role
Actual Outcome
The user is added to the role despite being master key locked
Environment Setup
Server
Database
The text was updated successfully, but these errors were encountered: