新增财务角色与财务报表并完善后台权限
This commit is contained in:
@@ -34,7 +34,7 @@ export type AdminSession = {
|
||||
permissions: string[]
|
||||
}
|
||||
|
||||
type AdminRole = 'admin' | 'operator' | 'support'
|
||||
type AdminRole = 'admin' | 'operator' | 'support' | 'finance'
|
||||
type AdminUserStatus = 'active' | 'disabled'
|
||||
|
||||
export async function ensureAdminUsersBootstrapped(): Promise<void> {
|
||||
@@ -513,6 +513,10 @@ export function normalizeAdminRole(role: unknown): AdminRole {
|
||||
return 'support'
|
||||
}
|
||||
|
||||
if (normalized === 'finance') {
|
||||
return 'finance'
|
||||
}
|
||||
|
||||
return 'operator'
|
||||
}
|
||||
|
||||
@@ -539,7 +543,7 @@ function normalizeRoleQuery(role: unknown): string {
|
||||
const normalized = String(role || '')
|
||||
.trim()
|
||||
.toLowerCase()
|
||||
return ['admin', 'operator', 'support'].includes(normalized) ? normalized : ''
|
||||
return ['admin', 'operator', 'support', 'finance'].includes(normalized) ? normalized : ''
|
||||
}
|
||||
|
||||
function normalizeStatusQuery(status: unknown): string {
|
||||
|
||||
Reference in New Issue
Block a user