From 23877af9607b842d0b1dbb9e35d719ec64e696d9 Mon Sep 17 00:00:00 2001 From: weichen Date: Mon, 19 Oct 2026 03:23:04 +0000 Subject: [PATCH] Fix unused exports in accountAuthority for knip guard --- src/accountAuthority.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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