Fix user group ACL UI permission keys - #7
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.
Что сделано
Гриды ACL группы пользователей проверяли
usergroup_create. Эта строка — лексикон-ключ Form Customization, а не разрешение Access Policy, поэтомуuserCanCreateвсегда было false. Кнопки Add Context/Category/Source/Namespace/Resource Group игнорировали флаг и оставались видимыми.Этот PR:
usergroup_new+usergroup_saveдля этих кнопок Create (getCreateAclButtonнаUserGroupBase).usergroup_newиusergroup_save.usergroup_user_editиusergroup_user_list, поэтому выключение list больше не оставляет комбо пользователей как черный ход.delete_roleв английском лексиконе.Скрытие родительского меню (
access_permissions), таб vs прямой URL и процессорныйnewбезsaveне меняются. Это относится к modxcms#16595 и остальной серии ACL 2019.Как проверить
usergroup_newили безusergroup_save: эти контролы Create скрыты.Security/Group/Createпо-прежнему требует толькоusergroup_newпри прямом вызове.usergroup_user_list, сusergroup_user_edit: Add User скрыт в дереве и в гриде пользователей группы. Грид пользователей группы остаётся скрытым (существующее поведение).php -lна затронутых PHP: exit 0core/vendor/bin/phpunit -c _build/test/phpunit.xml --filter AccessPermissionUiTest --no-coverage: OK (10 тестов, 34 assertions)core/vendor/bin/phpcs --standard=phpcs.xml _build/test/Tests/Model/Security/AccessPermissionUiTest.php: exit 0Связанные
Refs modxcms#14497 (не закрывает полный инвентарь 2019). Связанные: modxcms#14406, modxcms#14434, modxcms#16595.
Совместимость
Только менеджер UI. Проверки разрешений коннектора не менялись. Безопасно для 3.x patch.
Оригинал: modxcms#17004