From cab65e7709cee283f83f5f94e7674b6148831995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=99=E5=AD=A6=E6=9D=B0?= Date: Wed, 10 Jan 2018 14:05:56 +0800 Subject: [PATCH] bug fix --- src/PdAuth/Middleware/Authenticate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }