Skip to content

Fix/authhelper nested api controller - #231

Open
vanterbit wants to merge 13 commits into
webvimark:masterfrom
xvetx:fix/authhelper-nested-api-controller
Open

Fix/authhelper nested api controller#231
vanterbit wants to merge 13 commits into
webvimark:masterfrom
xvetx:fix/authhelper-nested-api-controller

Conversation

@vanterbit

Copy link
Copy Markdown

No description provided.

xvetx and others added 13 commits June 20, 2019 11:07
PHP 7.3 Fixed bug with notes on compact() function
Ввиду того что у нас шаблон advanced нам это приводит к конфликту site.com/admin/admin-payment - будет без доступа
…in route scan

Da\User\Controller\api\v1\AdminController requires a UserQuery service
argument in its constructor. AuthHelper::getControllerRoutes() walked
into the 'api/v1' subdirectory and tried `new $className($id, $module)`
for it, throwing ArgumentCountError during permission/refresh-routes.

Also fixes the id-only variant of the 'admin' exclusion, which only
matched at the top level (prefix + id === 'admin') and missed nested
controllers named 'admin' under any sub-namespace.

Cherry-picked from the upstream v1.0.23 fix (commit b9af474), rebased
onto the correct xvetx\\modules\\UserManagement namespace (1.0.20)
instead of the accidentally-reverted webvimark\\... namespace that
v1.0.21-v1.0.23 shipped with.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants