Repository navigation
fix(manager-api): require msorder_save for order write routes - #402
Merged
Merged
Conversation
Member
Author
Follow-up по silent-failure reviewЗакрыто в PR:
Оставлено follow-up (вне #377):
|
Split /api/mgr/orders into read (msorder_list) and write (msorder_save) groups so list-only manager roles cannot mutate orders via the API.
Extend the #377 regression test to dispatch sample routes with a stub modX so list-only write and save-only read return 403 before handlers.
Ibochkarev
force-pushed
the
fix/issue-377-orders-msorder-save
branch
from
July 23, 2026 16:07
7db66f2 to
195a4ad
Compare
Member
|
Security-фикс проверен, red-green прогнал сам:
Проверил:
Замечание (follow-up, не блокер): orders Для CHANGELOG: orders write, включая delete, теперь требует Мержим. |
This was referenced Jul 23, 2026
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/orders/*целиком висела наmsorder_list, поэтому роль только со списком могла менять и удалять заказы через Manager API.Разделил маршруты на две группы:
msorder_listmsorder_savePermissionMiddlewareпо-прежнему отдаёт 403 до контроллера. РодительскийAuthMiddleware(mgr)не менялся.Тип изменений
Связанные Issues
Closes #377
Как это было протестировано?
Gate E (exit codes):
php -l core/components/minishop3/config/routes/manager.php→ 0php -l core/components/minishop3/tests/OrdersRoutePermissionsTest.php→ 0php core/components/minishop3/tests/OrdersRoutePermissionsTest.php→ 0 (OK)origin/betaтот же тест падает (POST …→msorder_list); после фикса → 0php core/components/minishop3/tests/DirectFilterKeysTest.php→ 0Конфигурация тестирования:
fix/issue-377-orders-msorder-saveСкриншоты (если применимо)
Чеклист
Дополнительные заметки
msorder_save(как в AC issue). Отдельныйmsorder_remove— follow-up.