UNPKG

@authup/core

Version:

Package containing global constants, types & interfaces.

30 lines 969 B
import type { Ability, AbilityManagerFilterOptions } from './type'; export declare class AbilityManager { protected items: Ability[]; constructor(input?: Ability[] | Ability); /** * Check if permission is assigned with field and condition restriction. */ satisfy(options: AbilityManagerFilterOptions): boolean; satisfy(name: string, options?: AbilityManagerFilterOptions): boolean; /** * Check if permission is assigned without any restrictions. * * @param name */ has(name: string | string[]): boolean; /** * Find the first matching ability. * * @param input */ findOne(input?: string | AbilityManagerFilterOptions): Ability | undefined; /** * Find all matching abilities. * * @param input */ find(input?: string | AbilityManagerFilterOptions): Ability[]; set(input: Ability[] | Ability, merge?: boolean): void; } //# sourceMappingURL=module.d.ts.map