This commit is contained in:
walkor 2022-12-26 10:47:17 +08:00
parent c9df58cacf
commit b2fa0399d5
2 changed files with 1 additions and 2 deletions

View File

@ -98,7 +98,6 @@ class Auth
// 如果action为index规则里有任意一个以$controller开头的权限即可
if (strtolower($action) === 'index') {
$controller = str_replace('\\', '\\\\', $controller);
$rule = Rule::where(function ($query) use ($controller, $action) {
$query->where('key', 'like', "$controller@%")->orWhere('key', $controller);
})->whereIn('id', $rule_ids)->first();

View File

@ -37,7 +37,7 @@ class AccessControl implements MiddlewareInterface
EOF
);
} else {
$response = view('common/error/403');
$response = view('common/error/403')->withStatus(403);
}
}