Repository navigation
fix: preserve conditional roles when registering name matching - #539
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #539 +/- ##
==========================================
+ Coverage 70.47% 70.92% +0.45%
==========================================
Files 66 66
Lines 3356 3357 +1
Branches 617 616 -1
==========================================
+ Hits 2365 2381 +16
+ Misses 794 781 -13
+ Partials 197 195 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
hsluoyz
self-requested a review
October 26, 2026 13:14
hsluoyz
approved these changes
Oct 26, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Registering a role-name matcher through
addNamedMatchingFuncthrowsClassCastExceptionfor conditional role managers. Registering it directly rebuilds the graph without condition functions or parameters, so a previously denied request can become allowed.Dispatch to the supported role-manager implementations and rebuild conditional role graphs from explicit links while retaining all condition metadata, including conditions registered before their links. Regression tests exercise named roles with and without domains, repeated matcher registration, matcher replacement, parameter updates, and effective pattern matching.
Validation:
mvn -B -ntp clean verify cobertura:cobertura -Papache-release -Drevision=1.100.0 -Dgpg.skip=truepassed all 350 tests with zero failures, errors, or skips, including conformance inputs pinned toapache/casbin@c35c93d29063b8bc3bc2ef30b09943d344a289f4.Cobertura still emits the existing source-parser diagnostics while calculating complexity; the build exits successfully.