From 298299cbcb208575ce600113db62fb0f752c33c4 Mon Sep 17 00:00:00 2001 From: SS Date: Wed, 27 Sep 2023 22:57:54 +0800 Subject: [PATCH] add emp role permission check --- src/Middleware/Permission.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Middleware/Permission.php b/src/Middleware/Permission.php index c97aabc4..0b3f40ff 100644 --- a/src/Middleware/Permission.php +++ b/src/Middleware/Permission.php @@ -37,6 +37,9 @@ public function handle(Request $request, \Closure $next, ...$args) return $next($request); } + // add emp role group check todo + + if (!Admin::user()->allPermissions()->first(function ($permission) use ($request) { return $permission->shouldPassThrough($request); })) {