[release-4.21] OCPBUGS-95544: Fix RoleBindings tab error for non-cluster-admin users#16695
[release-4.21] OCPBUGS-95544: Fix RoleBindings tab error for non-cluster-admin users#16695rhamilto wants to merge 1 commit into
Conversation
When viewing the RoleBindings tab on a project details page, the console unconditionally fetched ClusterRoleBindings at cluster scope, causing a "Restricted access" error for users without cluster-admin permissions. Use an access review to check whether the user can list ClusterRoleBindings. When the check fails (non-cluster-admin), the ClusterRoleBinding watch is omitted, preventing the error. When the check succeeds (cluster-admin), ClusterRoleBindings are fetched regardless of whether a namespace is selected, preserving the "Cluster-wide RoleBindings" Kind filter option on the list page. (cherry picked from commit 214e15c) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@rhamilto: This pull request references Jira Issue OCPBUGS-95544, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/verified by @rhamilto |
|
@rhamilto: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@rhamilto: This pull request references Jira Issue OCPBUGS-95544, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/approve |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhamilto, sg00dwin The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
Test plan
🤖 Generated with Claude Code