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
Bug 1833146: Hide Project Access Tab when the user have no access to role bindings #5350
Bug 1833146: Hide Project Access Tab when the user have no access to role bindings #5350
Conversation
@debsmita1: The label(s) In 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 kubernetes/test-infra repository. |
@debsmita1: This pull request references Bugzilla bug 1833146, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
In 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 kubernetes/test-infra repository. |
/cc @andrewballantyne @openshift/team-devconsole-ux @serenamarie125 |
const canListRoleBindings = useAccessReview({ | ||
group: RoleBindingModel.apiGroup, | ||
resource: RoleBindingModel.plural, | ||
verb: 'list', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vikram-raj please raise an issue to track this. It's a general problem we need to get better at. We see the same missed experience for users with view but not edit access for health checks.
For simplicity right now it's best to stick to hiding if they cannot edit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@christianvogt, For now, do I need to hide the Project Access tab if the user has no permission to create & delete access?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to hide if the user cannot create role bindings.
There's other checks we should make but better to not let someone even attempt to do something they cannot complete right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, We need to check for both create
and list
access here.
Created an issue to track it https://issues.redhat.com/browse/ODC-3813
https://issues.redhat.com/browse/ODC-3819
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm @debsmita1 ! thanks for doing this
887f82b
to
8ea2712
Compare
@debsmita1: This pull request references Bugzilla bug 1833146, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
In 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 kubernetes/test-infra repository. |
/retest |
1 similar comment
/retest |
/test frontend |
8ea2712
to
6293c46
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, debsmita1, serenamarie125, vikram-raj The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@debsmita1: All pull requests linked via external trackers have merged: openshift/console#5350. Bugzilla bug 1833146 has been moved to the MODIFIED state. In 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 kubernetes/test-infra repository. |
Fixes
https://issues.redhat.com/browse/ODC-3733
Root Cause/Analysis
Previously
Project Access
was an independent nav item in the Dev perspective, which is now one of the tabs in the Project Details page.Solution Description
list
&create
access check has been added before rendering theProject Access
tab. If the user has no permission tolist
orcreate
project access, it will be hiddenGIF/Screenshot
Unit test coverage report
/kind bug