Closed Lin-1997 closed 3 months ago
[!IMPORTANT]
Review skipped
Auto reviews are limited to specific labels.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yaml
file in this repository. To trigger a single review, invoke the@coderabbitai review
command.You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
The changes enhance role assignment logic in the application creation process, ensuring that roles like "MODIFY_NAMESPACE" and "RELEASE_NAMESPACE" are accurately assigned to the application's owner rather than a default operator. This refinement addresses issues with improper permission granting when an application is created, leading to a more precise and secure role management system.
Files | Change Summary |
---|---|
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/defaultimpl/DefaultRoleInitializationService.java |
Updated role assignment logic in initAppRoles to utilize app.getOwnerName() instead of hardcoded operator, enhancing accuracy of permissions. |
sequenceDiagram
participant User
participant Application
participant RoleService
User->>Application: Create Application (Owner: B)
Application->>RoleService: Assign Roles (Owner: B)
RoleService-->>Application: Assign "MODIFY_NAMESPACE" and "RELEASE_NAMESPACE" to B
Application-->>User: Confirm Role Assignment
Objective | Addressed | Explanation |
---|---|---|
A user's permissions are correctly assigned (#5181) | ✅ | |
Roles assigned to the actual application owner | ✅ |
In the fields where rabbits play,
Permissions now align the way.
Owners bask in rightful glow,
Roles assigned, the limits grow.
Hopping high with joy and cheer,
Accurate roles, the vision’s clear! 🐰✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅
I have read the CLA Document and I hereby sign the CLA
What's the purpose of this PR
when creating an application, assign roles to owner instead of operator
Which issue(s) this PR fixes:
Fixes https://github.com/apolloconfig/apollo/issues/5181
Brief changelog
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean test
to make sure this pull request doesn't break anything.CHANGES
log.Summary by CodeRabbit