feat : admin driver name
This commit is contained in:
@@ -13,6 +13,7 @@ namespace App\Service\Admin\User;
|
||||
use App\Cache\Redis\Admin\MenuCache;
|
||||
use App\Cache\Redis\Admin\RoleCache;
|
||||
use App\Constants\Admin\AuthCode;
|
||||
use App\Constants\Common\RoleCode;
|
||||
use App\Exception\AdminException;
|
||||
use App\Model\AdminRole;
|
||||
use App\Model\AdminRoleMenu;
|
||||
@@ -178,7 +179,7 @@ class RoleService extends BaseService
|
||||
public function changeStatus(): array
|
||||
{
|
||||
$id = (int)$this->request->input('role_id');
|
||||
if ($id == AuthCode::SUPERADMIN) throw new AdminException('超级管理员不可关闭');
|
||||
if ($id == RoleCode::SUPER_ADMIN) throw new AdminException('超级管理员不可关闭');
|
||||
|
||||
if (!$info = $this->adminRoleModel->getInfoById($id)) throw new AdminException('角色不存在');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user