From 652d01a39a422d5544bbc2245b49b3ed83a49f75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=99=E5=AD=A6=E6=9D=B0?= Date: Tue, 23 Jan 2018 11:32:29 +0800 Subject: [PATCH] bugfix --- src/PdAuth/Middleware/Authenticate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PdAuth/Middleware/Authenticate.php b/src/PdAuth/Middleware/Authenticate.php index 108f296..549f16a 100644 --- a/src/PdAuth/Middleware/Authenticate.php +++ b/src/PdAuth/Middleware/Authenticate.php @@ -72,7 +72,7 @@ class Authenticate $user = $request->user(); $match = []; foreach ($user['roles'] as $role) { - if (array_key_exists($role['role']['role'], $privileges)) { + if (array_key_exists($role['role']['key'], $privileges)) { $match += $privileges[$role['role']['key']]; } }