@wepublish/api
Version:
API core for we.publish.
8 lines (7 loc) • 528 B
TypeScript
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;