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

Simplify handling of admin permissions #2430

Merged
merged 1 commit into from Aug 3, 2015

Conversation

seanh
Copy link
Contributor

@seanh seanh commented Aug 3, 2015

@tilgovi I realised that #2424 was kind of silly. We don't need a custom context resource factory for admin-only views, we just need to give the 'group:admin' principal the 'admin' permission on the root resources, and add the 'admin' permission to admin views.

That is, assuming we don't already use a permission called 'admin' anywhere else.

We don't need a custom context resource factory for admin-only views, we
just need to give the 'group:admin' principal the 'admin' permission on
the root resources, and add the 'admin' permission to admin views.
@nickstenning
Copy link
Contributor

LGTM.

I think 'admin' as a permission name is fine for these views, as the permission really kind of is "behave as a site admin" quite explicitly, but we should be cautious about missing the main point of a capability-based access control system: namely decoupling names for authorisation groups from names of capabilities. (So, don't fall into the trap of thinking that everything an admin should be able to do is to be guarded by the "admin" permission...)

nickstenning added a commit that referenced this pull request Aug 3, 2015
…ndling

Simplify handling of admin permissions
@nickstenning nickstenning merged commit 4371daa into master Aug 3, 2015
@seanh
Copy link
Contributor Author

seanh commented Aug 3, 2015

I was worried that maybe we used 'admin' as a permission name on some of our annotations too

@seanh seanh mentioned this pull request Aug 20, 2015
@nickstenning nickstenning deleted the simplify-admin-permission-handling branch September 10, 2015 13:06
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.

None yet

2 participants