-
Notifications
You must be signed in to change notification settings - Fork 4
Reflect RBAC rules from backend in GUI #2058
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
base: main
Are you sure you want to change the base?
Conversation
|
I'm not sure about this approach. Greyed out entries in the dropdown list ok but don't you just want to restrict the whole page instead of disabling the Submit button? |
In the current implementation, the entire input form is disabled, hence the |
Why show the form at all though. In WfoStepForm you could show a message instead of showing the disabled form.
Have you guys considered extending the WfoIsAllowedToRender wrapper to handle this case aswell? This feels like we are putting auth code in more places now. |
The idea discussed with Wouter was to make it visible when a user lacks permissions to do something, preferably without altering the look and feel of the interface. So if there's a dropdown that has options a user cannot select; the options are shown greyed out. If there's a button the user cannot press; the button is greyed out. All of the greyed out items are meant to have an on-hover text informing the user that they lack permissions - similar to the on-hover text for disabled actions on an out-of-sync subscription. If you have concerns about the design though then we should reconsider it :) Replacing the components with a different text is an option.. doesn't sound very pretty though. |
After some reflection and input from Mark and Wouter I understand the reasoning for not hiding the forms but instead show them with messages about the missing priviliges. Also the reason for not handling these priviliges on opa level as we do in other places is that the rules on the roles are handles in the orchestrator core layer specifically and not in the - in the case of Surf - in the oidc/opa layer. The last thing to mention is that these check need to be implemented in the pydantic forms implemenation of the form handling seperately. |
Wait with merging until orchestrator-core 4.2.0 has been released. |
Closes #2013 and #1730
Depends on: workfloworchestrator/orchestrator-core#990
Adds support for reflecting RBAC rules from the backend in the frontend. Depends on a backend update.
When a user lacks permission for an operation, buttons and input fields (if applicable) are grayed out
Unable to create specific products:

Unable to start a specific task:

Unable to resume a workflow:

Unable to run a specific workflow on a subscription:
