业务权限凭证管理

在开启安全配置情况下,需要对应的权限才可以执行, 如对业务权限进行增删改需要 '管理业务权限凭证', 查看需要 '查看业务权限凭证'

interface PermissionManager {
    create: ((name, label, category) => string);
    delete: ((id) => void);
    getCategoryList: (() => string[]);
    getList: (() => Permission[]);
    getListByCategory: ((category) => Permission[]);
}

Properties

create: ((name, label, category) => string)

create a service permission, return new created permission id

Type declaration

    • (name, label, category): string
    • Parameters

      • name: string

        name of permission, should be unique

      • label: string

        label of permission

      • category: string

        category of permission, can be empty or unset

      Returns string

delete: ((id) => void)

delete permission by id

Type declaration

    • (id): void
    • Parameters

      • id: string

      Returns void

getCategoryList: (() => string[])

get all permission categories

Type declaration

    • (): string[]
    • Returns string[]

getList: (() => Permission[])

get all permission

Type declaration

getListByCategory: ((category) => Permission[])

get permission list by category, if category is empty string, return all permission without category

Type declaration