Skip to content

[release-4.21] OCPBUGS-95544: Fix RoleBindings tab error for non-cluster-admin users#16695

Open
rhamilto wants to merge 1 commit into
openshift:release-4.21from
rhamilto:OCPBUGS-95544
Open

[release-4.21] OCPBUGS-95544: Fix RoleBindings tab error for non-cluster-admin users#16695
rhamilto wants to merge 1 commit into
openshift:release-4.21from
rhamilto:OCPBUGS-95544

Conversation

@rhamilto

@rhamilto rhamilto commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

  • Cherry-pick of 214e15c from main to release-4.21
  • 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
  • Adds an access review to conditionally omit the ClusterRoleBinding watch for non-cluster-admin users

Test plan

  • Log in as a non-cluster-admin user, navigate to a project's RoleBindings tab — verify no "Restricted access" error
  • Log in as a cluster-admin user, navigate to the RoleBindings list page — verify "Cluster-wide RoleBindings" Kind filter option still appears

🤖 Generated with Claude Code

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>
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jul 1, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-95544, which is invalid:

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Summary

  • Cherry-pick of 214e15c from main to release-4.21
  • 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
  • Adds an access review to conditionally omit the ClusterRoleBinding watch for non-cluster-admin users

Test plan

  • Log in as a non-cluster-admin user, navigate to a project's RoleBindings tab — verify no "Restricted access" error
  • Log in as a cluster-admin user, navigate to the RoleBindings list page — verify "Cluster-wide RoleBindings" Kind filter option still appears

🤖 Generated with Claude Code

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.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c559556b-820b-462f-9934-737d4d92f65a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@rhamilto rhamilto changed the title OCPBUGS-95544: Fix RoleBindings tab error for non-cluster-admin users [release-4.21] OCPBUGS-95544: Fix RoleBindings tab error for non-cluster-admin users Jul 1, 2026
@rhamilto

rhamilto commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

/verified by @rhamilto
/label backport-risk-assessed

@openshift-ci openshift-ci Bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Jul 1, 2026
@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 1, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rhamilto: This PR has been marked as verified by @rhamilto.

Details

In response to this:

/verified by @rhamilto
/label backport-risk-assessed

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.

@openshift-ci openshift-ci Bot requested review from jhadvig and sg00dwin July 1, 2026 13:45
@openshift-ci openshift-ci Bot added component/core Related to console core functionality approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 1, 2026
@rhamilto

rhamilto commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jul 1, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@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
  • bug is open, matching expected state (open)
  • bug target version (4.21.z) matches configured target version for branch (4.21.z)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-90636 is in the state Release Pending (Done), which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-90636 targets the "4.22.0" version, which is one of the valid target versions: 4.22.0
  • bug has dependents

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

/jira refresh

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.

@rhamilto

rhamilto commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

/approve

@sg00dwin

sg00dwin commented Jul 1, 2026

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 1, 2026
@openshift-ci

openshift-ci Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. component/core Related to console core functionality jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants