From 4db4bc6f2086c1d94667a192e67df29991d3c636 Mon Sep 17 00:00:00 2001 From: augushong Date: Thu, 17 Oct 2024 08:48:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B6=85=E7=BA=A7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98=E5=88=A4=E6=96=AD=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/base/common/service/AuthServiceBase.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extend/base/common/service/AuthServiceBase.php b/extend/base/common/service/AuthServiceBase.php index d5cdf83..1b7d55a 100644 --- a/extend/base/common/service/AuthServiceBase.php +++ b/extend/base/common/service/AuthServiceBase.php @@ -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; } // 判断权限验证开关