-
Notifications
You must be signed in to change notification settings - Fork 143
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
Fix bug possible to override project rbac built-in roles #4921
Conversation
Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4921 +/- ##
=======================================
Coverage 29.29% 29.29%
=======================================
Files 321 321
Lines 40835 40835
=======================================
Hits 11964 11964
Misses 27913 27913
Partials 958 958 ☔ View full report in Codecov by Sentry. |
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.
I understood what you did and it worked well.
[ASK] Is there any way to update built-in roles from UI now? (hacking DOM?)
(just asking, not a problem)
Basically, it's just UI lock, mean we disable the edit button for built-in roles' policies. Not sure about your mentioned hacking DOM, but since there is no lock on server side, simply send a request to the update RBAC roles endpoint with updated built-in roles data will override it 👀 |
@khanhtc1202 Thanks, I got it. |
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.
Great detection, thanks 🚀
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 🙆♂️
What this PR does / why we need it:
As a spec, we don't allow users to update the project built-in RBAC roles. This PR changes the UpdateRBACRoles logic to ensure that.
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: