diff --git a/src/PdAuth/Middleware/Authenticate.php b/src/PdAuth/Middleware/Authenticate.php index 4176955..1eaa923 100644 --- a/src/PdAuth/Middleware/Authenticate.php +++ b/src/PdAuth/Middleware/Authenticate.php @@ -73,10 +73,10 @@ class Authenticate $match = []; foreach ($user['roles'] as $role) { if (array_key_exists($role['role']['role'], $privileges)) { - $match = $privileges[$role['role']['role']]; + $match += $privileges[$role['role']['role']]; } } - + if (in_array($path, $match)) { return $next($request); }