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

27 lines
611 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 路由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)[]
}