fix(mgr): ACL на запись /grid-config (mssetting_save)#436
Open
Ibochkarev wants to merge 2 commits into
Open
Conversation
Ibochkarev
force-pushed
the
fix/issue-417-grid-config-write-acl
branch
from
July 23, 2026 15:59
b1adfbd to
fb8acca
Compare
Global msGridField updates were reachable with only view_document, so any manager who can open documents could reshape grids for everyone. Keep GET on view_document; guard PUT/POST/DELETE with mssetting_save.
PHPCS requires a space after function and multi-line if parentheses on their own lines; also wrap long error responses and the ACL regex.
Ibochkarev
force-pushed
the
fix/issue-417-grid-config-write-acl
branch
from
July 24, 2026 02:17
c2e5bd0 to
6d1e667
Compare
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.
Описание
Write-эндпойнты
/api/mgr/grid-configбольше не открыты под однимview_document. Глобальные колонкиmsGridFieldменяют только пользователи сmssetting_save. Чтение конфигурации грида остаётся наview_document.Тип изменений
Связанные Issues
Closes #417
Смежно с #378 / #381 (другие ACL-поверхности mgr API).
Как это было протестировано?
Gate E (эта сессия):
php -l config/routes/manager.php— OKphp tests/GridConfigRouteAclTest.php— OK (полная карта method→permission)composer ci:php— OK (exit 0)Vue — n/a (UI без своей ACL; API отдаст 403)
Ручное тестирование
Автоматические тесты (
composer ci:php)Тестирование на разных версиях PHP/MODX
Конфигурация тестирования:
fix/issue-417-grid-config-write-aclСкриншоты (если применимо)
n/a
Чеклист
Дополнительные заметки
Карта ACL:
/{grid_key}view_document/{grid_key}mssetting_save/{grid_key}/fieldmssetting_save/{grid_key}/field/{field_name}mssetting_save/{grid_key}/{field_name}mssetting_saveUX: вкладка «Конфигурация гридов» без
mssetting_saveполучит 403 на save — ожидаемо.Review: code-reviewer, thermo-nuclear, security-review; 1 fix-loop (усилен smoke-тест partition).