-
Notifications
You must be signed in to change notification settings - Fork 406
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
[#6116] fix(authz): Fix the check of duplicated privileges #6117
Conversation
Lists.newArrayList(Privileges.SelectTable.allow(), Privileges.SelectTable.deny()))); | ||
Lists.newArrayList(Privileges.ReadFileset.allow(), Privileges.ReadFileset.deny()))); |
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 think maybe we can use Set<Privilge>
in the grantPrivilegesToRole(..., ..., Set<Privilge> privileges)
?
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.
Modified.
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 modified the implement of server. If we want to change the client side, we should deprecate the API and add new API.
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.
All changed.
@@ -321,7 +322,7 @@ static SecurableObjectDTO toSecurableObject(SecurableObject securableObject) { | |||
.build(); | |||
} | |||
|
|||
static List<PrivilegeDTO> toPrivileges(List<Privilege> privileges) { | |||
static List<PrivilegeDTO> toPrivileges(Collection<Privilege> privileges) { |
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.
Collection<Privilege>
or Set<Privilege>
?
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.
Collection. Other places I used some collections which are not sets.
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
…che#6117) ### What changes were proposed in this pull request? Fix the check of duplicated privileges ### Why are the changes needed? Fix: apache#6116 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Added new UT.
What changes were proposed in this pull request?
Fix the check of duplicated privileges
Why are the changes needed?
Fix: #6116
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Added new UT.