Repository navigation
Conversation
Show which permissions and aggregated policies will be deleted versus those that keep other associated policies, and correct the warning copy. Closes keycloak#55695 Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The helper misclassifies transitively deleted policies as survivors because it excludes only the selected policy rather than computing the full cascading deletion set.
1 open issue
What changed in this PR
Updates the Authorization → P 8000 olicies list delete dialog to distinguish dependents expected to be removed from those retaining other policy associations, addressing #55695.
Changes:
- Fetches associated policies and partitions dependents into separate warnings.
- Corrects English warning text.
- Adds unit and browser regression coverage.
| File | Description |
|---|---|
js/apps/admin-ui/test/clients/authorization.ts |
Adds dialog and assertion helpers. |
js/apps/admin-ui/test/clients/authorization.spec.ts |
Tests dependent warnings and deletion outcomes. |
js/apps/admin-ui/src/clients/authorization/Policies.tsx |
Fetches associations and renders separate warnings. |
js/apps/admin-ui/src/clients/authorization/partitionDependentPolicies.ts |
Adds dependent classification logic. |
js/apps/admin-ui/src/clients/authorization/partitionDependentPolicies.test.ts |
Tests classification scenarios. |
js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties |
Updates English deletion warnings. |
Review effort: Balanced
Comment on lines
+17
to
+19
| const remaining = (dependent.associatedPolicies ?? []).filter( | ||
| (policy) => policy.id !== deletedPolicyId, | ||
| ); |
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.

Closes #55695
The Authorization → Policies delete confirmation listed every dependent under a “will be removed” warning even when some keep other associated policies. The dialog now partitions dependents the same way the server does and corrects the English copy.
Decisions and assumptions:
AI agents assisted with implementing this change from the issue description.