修改超级管理员判断方式

This commit is contained in:
augushong
2024-10-17 08:48:08 +08:00
parent 0196920236
commit 4db4bc6f20

View File

@@ -66,6 +66,11 @@ class AuthServiceBase
return $this;
}
public function isSuperAdmin()
{
return $this->adminId == AdminConstant::SUPER_ADMIN_ID;
}
/**
* 检测检测权限.
* @param null $node
@@ -77,7 +82,7 @@ class AuthServiceBase
public function checkNode($node = null)
{
// 判断是否为超级管理员
if ($this->adminId == AdminConstant::SUPER_ADMIN_ID) {
if ($this->isSuperAdmin()) {
return true;
}
// 判断权限验证开关