Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jturbide committed Jul 24, 2023
1 parent 30b6b46 commit d60cf3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Mvc/Controller/Rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,10 @@ public function beforeExecuteRoute(Dispatcher $dispatcher): void
$roleList = $permissions['roles'] ?? [];

foreach ($roleList as $role => $rolePermission) {
// do not attach other roles behaviors
if (!$this->identity->hasRole([$role])) {
continue;
}

if (isset($rolePermission['features'])) {
foreach ($rolePermission['features'] as $feature) {
Expand Down

0 comments on commit d60cf3f

Please sign in to comment.