You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Manager API: document-level ACL для category products #445
Добавить проверку resource-level прав MODX (checkPolicy view/save/publish/delete) для операций с товарами категории в Manager REST API, дополняя глобальные msproduct_* / view_document.
Проблема, которую решает
Сейчас CategoryProductsController и связанные маршруты опираются на глобальные MODX permissions. Пользователь с msproduct_save может мутировать товары в категории, к документу которой у него нет save/view policy — defense-in-depth слабее, чем в MODX resource tree.
Отдельно от #418 (parent scope / IDOR по category id в URL): даже с корректным scope остаётся вопрос «имеет ли пользователь право на этот документ категории/товара».
Предлагаемое решение
Для read: проверять view на ресурс категории {id} (и при nested — на категорию-родителя товара или на сам товар).
Для write/publish/delete: save / publish / delete на msProduct document.
Activity
fix(tests): stub document ACL for category products scope smoke
fix(tests): stub document ACL for category products scope smoke
fix(tests): stub document ACL for category products scope smoke
fix(tests): stub document ACL for category products scope smoke
fix(tests): stub document ACL for category products scope smoke
fix(tests): stub document ACL for category products scope smoke
fix(tests): stub document ACL for category products scope smoke
fix(tests): stub document ACL for category products scope smoke
feat(mgr-api): document-level ACL для category products (#473)
chore: sync beta with upstream modx-pro/MiniShop3 (#1)