-
Notifications
You must be signed in to change notification settings - Fork 392
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
[#2237] feat(core): Add the support of PermissionManager #2958
Conversation
core/src/main/java/com/datastrato/gravitino/authorization/PermissionManager.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/datastrato/gravitino/authorization/PermissionManager.java
Outdated
Show resolved
Hide resolved
// ignore this entity | ||
} | ||
} | ||
return roleEntities.stream().map(RoleEntity::name).collect(Collectors.toList()); | ||
} | ||
} |
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.
getValidXXX and removeInvalidXXX, it's the same thing, why do you implement twice?
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 will extract a common method for them.
List<RoleEntity> roleEntities = removeInvalidRoles(metalake, roleNames); | ||
roleNames = Lists.newArrayList(toRoleNames(roleEntities)); | ||
roleIds = Lists.newArrayList(toRoleIds(roleEntities)); | ||
} |
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 it really solve the problem? It's unrelated to GC, why do you call it GcXXX?
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 it's a kind of GC that we remove invalid roles. If it will make people confusing, I will rename it.
core/src/main/java/com/datastrato/gravitino/meta/GroupEntity.java
Outdated
Show resolved
Hide resolved
Continue to polish your code when you feel ready. I think it is not ready for review. |
@jerryshao I have added cache for the role. Could you review this pull request again? |
core/src/main/java/com/datastrato/gravitino/authorization/AccessControlManager.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/datastrato/gravitino/authorization/AuthorizationUtils.java
Show resolved
Hide resolved
core/src/main/java/com/datastrato/gravitino/authorization/AuthorizationUtils.java
Show resolved
Hide resolved
core/src/main/java/com/datastrato/gravitino/authorization/NameIdentifierUtils.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/datastrato/gravitino/authorization/PermissionManager.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/datastrato/gravitino/authorization/PermissionManager.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/datastrato/gravitino/authorization/PermissionManager.java
Show resolved
Hide resolved
core/src/main/java/com/datastrato/gravitino/authorization/PermissionManager.java
Show resolved
Hide resolved
core/src/main/java/com/datastrato/gravitino/authorization/RoleManager.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/datastrato/gravitino/authorization/UserGroupManager.java
Show resolved
Hide resolved
core/src/main/java/com/datastrato/gravitino/authorization/UserGroupManager.java
Show resolved
Hide resolved
This reverts commit 81a4168.
@jerryshao All comments are addressed. |
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.
CI passed. I will merge this pull request to the main branch. |
…e#2958) ### What changes were proposed in this pull request? Add the support for permission manager. ### Why are the changes needed? Fix: apache#2237 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Add a new UT. --------- Co-authored-by: Heng Qin <qqtt@123.com>
What changes were proposed in this pull request?
Add the support for permission manager.
Why are the changes needed?
Fix: #2237
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Add a new UT.