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

feat(api-v2): No custom permissions higher than defaults #1337

Merged
merged 11 commits into from
Jun 14, 2019

Conversation

benjamingeer
Copy link

@benjamingeer benjamingeer commented Jun 3, 2019

This PR ensures that when a user creates a resource/value, they can't provide custom permissions to give themselves a higher permission on the resource/value than they would get from its default permissions, unless they're a system admin or an admin of the containing project.

Resolves #1334.

@benjamingeer benjamingeer self-assigned this Jun 3, 2019
@daschbot
Copy link
Collaborator

daschbot commented Jun 3, 2019

This pull request has been mentioned on Discuss DaSCH. There might be relevant details there:

https://discuss.dasch.swiss/t/user-cant-give-themselves-higher-permissions-than-defaults-on-resource-value-creation/52/1

@benjamingeer benjamingeer mentioned this pull request Jun 3, 2019
@benjamingeer benjamingeer requested a review from subotic June 4, 2019 07:16
@benjamingeer
Copy link
Author

@subotic Do you think this is OK now?

Benjamin Geer added 5 commits June 5, 2019 10:02
# Conflicts:
#	webapi/src/main/scala/org/knora/webapi/responders/v2/ValuesResponderV2.scala
#	webapi/src/test/scala/org/knora/webapi/responders/v2/ValuesResponderV2Spec.scala
@benjamingeer
Copy link
Author

@subotic Would you have a minute to review this?

Copy link
Collaborator

@subotic subotic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks :-)

@benjamingeer benjamingeer merged commit 7b61b49 into develop Jun 14, 2019
@benjamingeer benjamingeer deleted the wip/1334-custom-permissions branch June 14, 2019 10:32
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.

Weird use case on resource creation with permissions
3 participants