新增超级管理员判断&权限范围

This commit is contained in:
JaguarJack
2020-07-04 21:56:47 +08:00
parent e798098a05
commit 9092b64c1f
2 changed files with 24 additions and 1 deletions

View File

@@ -118,4 +118,15 @@ class Utils
{
return \config('database.connections.mysql.prefix');
}
/**
* 是否是超级管理员
*
* @time 2020年07月04日
* @return bool
*/
public static function isSuperAdmin()
{
return request()->user()->id == config('catch.permissions.super_admin_id');
}
}