UNPKG

@wepublish/api

Version:
8 lines (7 loc) 528 B
import { Permission } from './permissions'; export declare const PERMISSIONS_METADATA_KEY = "permissions"; /** * Causes the method/class to require that the current user has the permission to do the action. * This uses the `OneOf` decorator, so if there are multiple guards attached, only one has to return true. */ export declare const Permissions: (...permissions: Permission[]) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;