function Permissions
Since 0.1.0
Permissions(...permissions: string[]): SetuClassOrMethodDecorator

Requires the authenticated principal to hold any of the given permissions. May be applied at the class or method level (method overrides class).

Enforced by DecoratorPlugin unless enforceRoles: false, with the same 401/403/absent-provider-501 behaviour as @Roles. A route carrying both @Roles and @Permissions requires (any role) AND (any permission).

Parameters

...permissions: string[]

One or more permission names

Return Type

A class or method decorator

Usage

import { Permissions } from "decorator-plugin/src/index.ts";