Fix Grant All checkbox not showing indeterminate state in permission modal#24807
Open
Fix Grant All checkbox not showing indeterminate state in permission modal#24807
Conversation
…modal When selecting "Select All" for a specific permission group, the "Grant All Permissions" checkbox should display an indeterminate state if not all permissions are granted. The issue was that GrantAll and GrantAny were calculated based on _groups (filtered list) instead of _allGroups (all groups), causing incorrect checkbox state when groups were filtered. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the Blazor permission management modal where the "Grant All Permissions" checkbox did not correctly display an indeterminate state when only some permission groups had all their permissions selected.
Changes:
- Changed
GrantAllandGrantAnyproperty calculations to use_allGroups(all permission groups) instead of_groups(filtered/visible groups) in three methods - Fixed the checkbox state calculation to reflect the actual state of all permissions, not just the filtered/visible ones
...ement/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor.cs
Show resolved
Hide resolved
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.
Summary
GrantAllandGrantAnycalculation to use_allGroupsinstead of_groups(filtered list)GroupGrantAllChanged,PermissionChanged, andOnPermissionGroupSearchTextChangedAsyncProblem
When selecting "Select All" for a specific permission group in the Blazor permission modal, the top-level "Grant All Permissions" checkbox appeared as if all permissions were granted, instead of showing the indeterminate ("-") state.
Root Cause
The
GrantAllandGrantAnyproperties were calculated based on_groups(the filtered/visible list) instead of_allGroups(all permission groups). This caused incorrect state when:Test plan
🤖 Generated with Claude Code