add platform

This commit is contained in:
xiaomlove
2021-06-22 18:51:58 +08:00
parent 5a5733cf0b
commit 76a6ad6ed3
5 changed files with 38 additions and 1 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ class Permission
{
/** @var User $user */
$user = $request->user();
if (!$user || !$user->canAccessAdmin()) {
if (!$user || (IS_PLATFORM_ADMIN && !$user->canAccessAdmin())) {
do_log("denied!");
throw new UnauthorizedException('Unauthorized!');
}