Allow Decorator

Allow Decorator

Allow

Attatches metadata to the resolver defining which permissions are required to execute the operation, using one or more Permission values.

Example

 @Allow(Permission.SuperAdmin)
 @Query()
 getAdministrators() {
     // ...
 }