UNPKG

@nangazaki/vue-rbac

Version:

Role-Based Access Control (RBAC) implementation for Vue.js

63 lines (62 loc) 2.08 kB
import { type PropType } from "vue"; export declare const RbacGuard: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ role: { type: PropType<string | string[]>; default: undefined; }; permission: { type: PropType<string | string[]>; default: undefined; }; any: { type: PropType<string | string[]>; default: undefined; }; all: { type: PropType<string | string[]>; default: undefined; }; /** * Denies access when the user has the specified role OR permission. * Accepts a string or array of strings. Each value is checked against * both roles and permissions — access is blocked if any match is found. */ not: { type: PropType<string | string[]>; default: undefined; }; }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any; }>[] | null | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ role: { type: PropType<string | string[]>; default: undefined; }; permission: { type: PropType<string | string[]>; default: undefined; }; any: { type: PropType<string | string[]>; default: undefined; }; all: { type: PropType<string | string[]>; default: undefined; }; /** * Denies access when the user has the specified role OR permission. * Accepts a string or array of strings. Each value is checked against * both roles and permissions — access is blocked if any match is found. */ not: { type: PropType<string | string[]>; default: undefined; }; }>> & Readonly<{}>, { permission: string | string[]; role: string | string[]; any: string | string[]; all: string | string[]; not: string | string[]; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;