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

Use Kithe::Model in access policy instead of Collection / Work / Asset. #1987

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

eddierubeiz
Copy link
Contributor

@eddierubeiz eddierubeiz commented Dec 8, 2022

Ref #1948
This will greatly simplify our access policy.
We can change the two calls to authorize! that mention Collection and Work back to the way they are now once chaps-io/access-granted#56 is merged -- if we want.

@eddierubeiz eddierubeiz self-assigned this Dec 8, 2022

role :admin, proc { |user| user&.admin_user? } do
can [:destroy, :publish], Kithe::Model
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't realize you could do two at once in an array like this, but confirmed with access_granted docs, ok!

@jrochkind
Copy link
Contributor

I thought you might through the spec in with this one too! But no matter!

@jrochkind jrochkind merged commit 7619c9d into master Dec 8, 2022
@jrochkind jrochkind deleted the use_kithe_model_in_policies branch December 8, 2022 16:36
@eddierubeiz
Copy link
Contributor Author

Thanks. The spec is coming soon.

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.

2 participants