diff --git a/src/accountAuthority.ts b/src/accountAuthority.ts index b590cc9..d785ab2 100644 --- a/src/accountAuthority.ts +++ b/src/accountAuthority.ts @@ -2,7 +2,7 @@ // 服务端授权仍是唯一权威——隐藏的入口经直连 API 调用同样会被拒绝。 interface AccountIdentity { isAdmin?: boolean; isSuperAdmin?: boolean } -export type AccountIdentityKind = 'super' | 'admin' | 'user' +type AccountIdentityKind = 'super' | 'admin' | 'user' export const accountIdentityKind = (account: AccountIdentity): AccountIdentityKind => account.isSuperAdmin ? 'super' : account.isAdmin ? 'admin' : 'user' @@ -10,7 +10,7 @@ export const accountIdentityKind = (account: AccountIdentity): AccountIdentityKi /** 创建管理员账号与任命/撤销管理员仅对超级管理员开放。 */ export const canAppointAdmins = (me: AccountIdentity | null | undefined) => !!me?.isSuperAdmin -export interface AccountActionPolicy { +interface AccountActionPolicy { /** 资料、角色与系统权限维护。 */ maintain: boolean toggleEnabled: boolean