We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89199a2 commit eaf5058Copy full SHA for eaf5058
app/middleware/AdminPermission.php
@@ -23,8 +23,8 @@ class AdminPermission {
23
*/
24
public function handle($request, \Closure $next): Response {
25
$userInfo = $request->API_ADMIN_USER_INFO;
26
-
27
- if (!$this->checkAuth($userInfo['id'], $request->pathinfo())) {
+ // rule里包含了rule(路由规则), ruoter(完整路由)
+ if (!$this->checkAuth($userInfo['id'], $request->rule()->getRule())) {
28
return json([
29
'code' => ReturnCode::INVALID,
30
'msg' => '非常抱歉,您没有权限这么做!',
0 commit comments