Skip to content
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

Merged
merged 28 commits into from
Apr 18, 2024

Conversation

qqqttt123
Copy link
Contributor

@qqqttt123 qqqttt123 commented Apr 15, 2024

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.

@qqqttt123 qqqttt123 self-assigned this Apr 15, 2024
@qqqttt123 qqqttt123 marked this pull request as draft April 15, 2024 15:38
@qqqttt123 qqqttt123 changed the title [#2241] feat(client,server): Add the support of permission operarion [#2241] feat(core): Add the support of permission entity Apr 15, 2024
@qqqttt123 qqqttt123 changed the title [#2241] feat(core): Add the support of permission entity [#2237] feat(core): Add the support of permission entity Apr 15, 2024
@qqqttt123 qqqttt123 changed the title [#2237] feat(core): Add the support of permission entity [#2237] feat(core): Add the support of PermissionManager Apr 15, 2024
@qqqttt123 qqqttt123 marked this pull request as ready for review April 15, 2024 17:03
@qqqttt123 qqqttt123 requested a review from jerryshao April 15, 2024 17:03
// ignore this entity
}
}
return roleEntities.stream().map(RoleEntity::name).collect(Collectors.toList());
}
}
Copy link
Contributor

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?

Copy link
Contributor Author

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));
}
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@jerryshao
Copy link
Contributor

Continue to polish your code when you feel ready. I think it is not ready for review.

@qqqttt123
Copy link
Contributor Author

qqqttt123 commented Apr 17, 2024

@jerryshao I have added cache for the role. Could you review this pull request again?

web/pnpm-lock.yaml Outdated Show resolved Hide resolved
Heng Qin added 2 commits April 17, 2024 21:07
@qqqttt123 qqqttt123 requested a review from jerryshao April 17, 2024 13:28
@qqqttt123
Copy link
Contributor Author

@jerryshao All comments are addressed.

Copy link
Contributor

@jerryshao jerryshao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@qqqttt123
Copy link
Contributor Author

CI passed. I will merge this pull request to the main branch.

@qqqttt123 qqqttt123 merged commit ec3b6c4 into apache:main Apr 18, 2024
22 checks passed
diqiu50 pushed a commit to diqiu50/gravitino that referenced this pull request Jun 13, 2024
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Subtask] Add a PermissionManager
2 participants