Fix user group ACL UI permission keys - #17004
Open
Ibochkarev wants to merge 1 commit into
Open
Conversation
The ACL grids checked usergroup_create, which is not a policy key, and Add User still listed users without usergroup_user_list.
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.
What changed and why
The user-group ACL grids checked
usergroup_create. That string is a Form Customization lexicon key, not an Access Policy permission, souserCanCreatewas always false. The Add Context/Category/Source/Namespace/Resource Group buttons ignored that flag and stayed visible.This PR:
usergroup_new+usergroup_savefor those Create buttons (getCreateAclButtononUserGroupBase).usergroup_newandusergroup_save.usergroup_user_editandusergroup_user_list, so turning off list no longer leaves the user combo as a side door.delete_rolein English.Parent-menu hiding (
access_permissions), tab vs direct URL, and processor-onlynewwithoutsaveare unchanged. Those belong with #16595 and the rest of the 2019 ACL series.How to test
usergroup_newor withoutusergroup_save: those Create controls are hidden.Security/Group/Createstill requires onlyusergroup_newif called directly.usergroup_user_list, withusergroup_user_edit: Add User is hidden in the tree and on the group users grid. Users in group grid stays hidden (existing behavior).php -lon touched PHP: exit 0core/vendor/bin/phpunit -c _build/test/phpunit.xml --filter AccessPermissionUiTest --no-coverage: OK (10 tests, 34 assertions)core/vendor/bin/phpcs --standard=phpcs.xml _build/test/Tests/Model/Security/AccessPermissionUiTest.php: exit 0Related issue(s)/PR(s)
Refs #14497 (does not close the full 2019 inventory). Related: #14406, #14434, #16595.
Compatibility notes
Manager UI only. Connector permission checks are unchanged. Safe for 3.x patch.
Breaking change assessment
No public API, processor, or policy-template change. Managers who relied on Add User without
usergroup_user_listlose that UI path. The Users page (view_user) is unchanged.Test coverage
_build/test/Tests/Model/Security/AccessPermissionUiTest.phpassertsGroup/Createusesusergroup_new, the ExtJS keys/factory, tree/Add User gates, and the Englishdelete_roleline.Contributors
@Ruslan-Aleev reported the ACL group in #14497.
AI tool use
Cursor agent (Composer) implemented the fix, tests, and this description from the issue and the 3.x re-check comment on #14497.