ai-manus/chat-client/types/acl.d.ts

27 lines
611 B
TypeScript
Raw Permalink Normal View History

2025-07-18 16:38:18 +08:00
/**
* v-permission权限对象
*/
declare interface GuardType {
/**
*
* eg: ROLE_ADMIN | ROLE_USER
*/
role?: string[]
/**
*
* eg: system:write | system:write
*/
permission?: string[]
/**
*
* allOf: 满足以上全部角色和权限
* oneOf: 满足以上角色和权限任一个
* except: 取反
*/
mode?: 'allOf' | 'oneOf' | 'except'
}
declare interface CanType extends Omit<GuardType, 'role' | 'permission'> {
permission?: (string | boolean)[]
}