Skip to content
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

Permissions attributes are incorrectly updated when multiple access levels are defined. #422

Open
jonathandixon opened this issue Oct 25, 2017 · 0 comments
Assignees
Labels

Comments

@jonathandixon
Copy link

Descriptive summary

10.5.0

When a user or group has multiple access permissions on an object, the permissions are incorrectly updated when saving permission_attributes.

Rationale

If the permissions on an object are:

And the permissions attributes are set to the same the result is two permissions both with read access.

Expected behavior

Should maintain both access levels for the user or group.

Actual behavior

The first access level is overwritten by the access level of the last permission passed to permission_attributes=.

Steps to reproduce the behavior

fs = FileSet.create
fs.permissions_attributes = [{:name=>"[email protected]", :type=>"person", :access=>"edit"}, {:name=>"[email protected]", :type=>"person", :access=>"read"}]
fs.save

fs.permissions_attributes = [{:name=>"[email protected]", :type=>"person", :access=>"edit"}, {:name=>"[email protected]", :type=>"person", :access=>"read"}]
fs.save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant