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

Handle multiple access levels when updating permission_attributes. #423

Closed
wants to merge 1 commit into from
Closed

Handle multiple access levels when updating permission_attributes. #423

wants to merge 1 commit into from

Conversation

jonathandixon
Copy link

Fixes #422

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

Changes proposed in this pull request:

Instead of trying to associate the new permission_attributes with existing permissions, reverse this so existing permissions are associated with the new permission attributes. This ensures that no more than 1 new permission_attribute is updating an existing permission.

@projecthydra/hydra-contributors

@jcoyne
Copy link
Member

jcoyne commented Nov 2, 2017

I think you’ve changed the expected behavior of permissions, where each user can only have one access on an object. Currently having edit access implies read access. So, this seems like a breaking change to me.

@jonathandixon
Copy link
Author

I suppose that if the expected behavior is that a user can only have one access on an object, then part of the fix should prevent a client from doing something like this:

target.edit_users += ['user1']
target.read_users += ['user1']

But fixing this could also be a breaking change.

Right now, I'm not sure how to best approach this.

@cjcolvar cjcolvar closed this May 17, 2021
@cjcolvar cjcolvar deleted the branch samvera:master May 17, 2021 13:06
@cjcolvar
Copy link
Member

cjcolvar commented Jul 4, 2021

The Renaming Branch Working Group is in the process of renaming the default branch from master to main in Samvera and Samvera-Labs repos. This brings repositories into compliance with the Samvera Community Code of Conduct (https://samvera.atlassian.net/wiki/spaces/samvera/pages/405212316/Code+of+Conduct) and language recommendations (https://github.com/samvera/maintenance/blob/master/templates/CONTRIBUTING.md#language). Background on the renaming effort is available in the working group notes (https://samvera.atlassian.net/wiki/x/b5IYHg).

I updated the default branch name for hydra-head which had the side effect of closing your pull request. Please reopen this pull request targeting the main branch if it is still relevant. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants