-
Notifications
You must be signed in to change notification settings - Fork 119
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: remove permission for Guest to list users #1028
Conversation
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.
Does this break any e2e tests? So guests can still reach the Users tab, but they will just get an empty table?
Codecov Report
@@ Coverage Diff @@
## develop #1028 +/- ##
===========================================
+ Coverage 51.70% 57.90% +6.20%
===========================================
Files 295 177 -118
Lines 16895 11271 -5624
Branches 2628 1726 -902
===========================================
- Hits 8735 6527 -2208
+ Misses 7170 4223 -2947
+ Partials 990 521 -469
Continue to review full report at Codecov.
|
@@ -49,6 +51,13 @@ class UserAuthzService extends Service { | |||
} | |||
|
|||
// Protected methods | |||
async authorizeList(requestContext) { | |||
if (requestContext.principal.userRole === 'guest') { |
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.
Is there a differentiation between internal v.s. external guest here?
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, both are different. @nguyen102 should we add internal guest
here as well?
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.
Good catch. I updated the code to deny access for internal-guest as well
Issue #, if available:
Description of changes:
fix: remove permission for Guest to list users
Checklist:
AS review ticket id:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.