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

Feature: Clarity on role based access for admin roles in CF #607

Open
thomasbergernz opened this issue May 3, 2024 · 2 comments
Open

Feature: Clarity on role based access for admin roles in CF #607

thomasbergernz opened this issue May 3, 2024 · 2 comments
Labels
documentation documentation to be updated enhancement Improvement to existing feature

Comments

@thomasbergernz
Copy link

Description

Superuser status request.user.is_superuser, staff status request.user.is_staff and PI is_pi are built-in roles controlling UI elements and access to functions in ColdFront.
Defining groups with "user permissions" seems another way to grant access to a group-based role. Example: https://coldfront.readthedocs.io/en/latest/howto/roles/director/
Group-based roles can be combined with "staff status". However, when doing so, the CF UI elements are not controlled by the "user permissions" only by "superuser status", "staff status" or "pi status".
So, while it is possible to assign some admin permissions and "staff status", the UI doesn't even offer a link to /admin.
"Admin staff" users can utilise /admin the Django admin UI.
We would like to have a role with e.g. allocation | allocation | Can add allocation permission to see UI elements like the button "Request Resource Allocation".

Component

Projects, Allocations, Administration

Additional information

Right now I have to make more staff a superuser to avoid any issues. This is risky and staff has to be cautious when changing the config.
@thomasbergernz thomasbergernz added documentation documentation to be updated enhancement Improvement to existing feature labels May 3, 2024
@dsajdak
Copy link
Contributor

dsajdak commented May 3, 2024

@thomasbergernz I see what you're saying but what is not clear is where you would want to see this "request resource allocation" button. Would you expect if a staff member were viewing a PI's project, they should be able to click that button there? Would you want to see that button under the "View all Allocations" list? Do you have another idea of how you'd like to see that implemented?

@thomasbergernz
Copy link
Author

@dsajdak checking is_staff and the permission would be a fine-grained solution.
E.g. when viewing a PI's project, the has_permission = True would show the button when viewing a PI's project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation documentation to be updated enhancement Improvement to existing feature
Projects
None yet
Development

No branches or pull requests

2 participants