fix: include super admin in hasAnyPermission semantics#5566
Merged
nobodyiam merged 4 commits intoFeb 21, 2026
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
9d6eb70 to
3f48d5d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's the purpose of this PR
This PR fixes a super-admin permission regression in Portal.
After permission checks were unified to
hasAnyPermission(...), super admins could still see namespace edit/publish actions in UI, but backend operations returned403when explicit namespace permissions were not granted.This change restores expected semantics by including super-admin bypass in unified permission checks, adds a Portal UI E2E regression test, and prepares the
2.xbranch for follow-up patch releases.Which issue(s) this PR fixes:
Fixes #5567
Brief changelog
DefaultRolePermissionService.hasAnyPermission(...).apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/component/UserPermissionValidatorTest.javaapollo-portal/src/test/java/com/ctrip/framework/apollo/portal/spi/defaultImpl/RolePermissionServiceTest.javae2e/portal-e2e/tests/portal-priority.spec.jssuper admin can edit and release namespace without explicit namespace roles @regression2.x):2.5.0release notes tochanges/changes-2.5.0.md2.5.1-SNAPSHOTCHANGES.mdtop section to2.5.1Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean testto make sure this pull request doesn't break anything.mvn spotless:applyto format your code.CHANGESlog.