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

Do not allow a submitter to approve a work #366

Merged
merged 2 commits into from
Sep 1, 2022

Conversation

carolyncole
Copy link
Member

@carolyncole carolyncole commented Sep 1, 2022

Only allow a user that has collection_admin to approve a work

fixes #332

Only allow a user that has collection_admin to approve a work
@@ -171,6 +171,14 @@ def valid_to_submit
errors.count == 0
end

def valid_to_approve(user)
valid_to_submit
unless user.has_role? :collection_admin, collection
Copy link
Member

Choose a reason for hiding this comment

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

👍🏼

@hectorcorrea hectorcorrea merged commit 663dfff into main Sep 1, 2022
@hectorcorrea hectorcorrea deleted the i-332-do-not-allow-approve branch September 1, 2022 17:45
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.

A submitter should not have the ability to approve a Work
3 participants