This commit is contained in:
molong committed 2026-02-11 22:42:37 +08:00
1 parent e265bcc28d
commit b0ae1bb68c
8 files changed
+1387 -574

No files matched your search

+8
View File
@@ -88,6 +88,14 @@ class User extends Authenticatable implements JWTSubject
return $this->roles()->where('code', $roleCode)->exists();
}
/**
* 判断用户是否为超级管理员
*/
public function isSuperAdmin(): bool
{
return $this->hasRole('super_admin');
}
/**
* 获取 JWT 标识符
*