console
console copied to clipboard
OCPBUGS-61246: Updated the RolesPage to dynamically fetch resources based on selected filters from URL parameters
Description
ClusterRoles doesn't show up under the "User Management → Roles" tab, when user has the access to ClusterRoles but not Roles.
Steps to Test out
- Create a new test user with htpasswd.
- Login at least once with this newly created user to activate the account
- Create the role that only allows to list ClusterRoles not Role
- Create the rolebinding with the newly created user and the view role.
- Login to the console and navigate to "User Management → Roles" tab. Before this fix, you should be expecting 403 not authorized error. But with this fix, you should be able to see all the ClusterRoles are being correctly returned, and leave the namespace role empty. (You can see the role count in the filter is equal to 0 for that)