fix(manager-api): require mssetting_save for config writes#404
Merged
Conversation
/api/mgr/config PUT/DELETE was Auth-only, so any logged-in manager could change Vue form config. Gate writes with mssetting_save; leave GET on mgr Auth so product forms still load without settings permission.
Ibochkarev
force-pushed
the
fix/issue-381-config-mssetting-save
branch
from
July 23, 2026 16:07
9a17b0d to
fc6440d
Compare
Member
|
Security-фикс, red-green прогнал:
Проверил:
Тот же высокий уровень, что #402. Блокеров нет. Для CHANGELOG: config writes (page-fields, sections) теперь требуют Мержим. |
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.
Описание
Группа
/api/mgr/config(PUT/DELETE page-fields и sections) была доступна любому аутентифицированному менеджеру — только outerAuthMiddleware, безPermissionMiddleware.Мутации закрыты
mssetting_save(как write у соседних settings-групп). GET оставлен на mgr Auth: формы товара (ProductDataFields) читают page-fields без права настроек.Тип изменений
Связанные Issues
Closes #381
Как это было протестировано?
Gate E (exit codes):
php -lmanager.php / ConfigRoutePermissionsTest / ModxStub → 0php core/components/minishop3/tests/ConfigRoutePermissionsTest.php→ 0 (OK)actual: NULL); с фиксом → 0Конфигурация тестирования:
fix/issue-381-config-mssetting-saveСкриншоты (если применимо)
Чеклист
Дополнительные заметки
mssetting_saveнамеренно: иначе роль сmsproduct_saveбез settings не откроет конфиг полей на карточке товара. Issue про write; read/write split как у заказов ([Bug] Manager API: write-операции заказов под permission msorder_list #377).