Function: Protect()
Protect(
acl?): (target,propertyKey?) =>void
Defined in: service-core/src/decorators/RouteDecorators.ts:277
Apply this to any route handler class or an individual route handler function to indicate that it should be
protected by the AccessControlList security system. The acl parameter specifies the ACL governing access
to the HTTP resource(s) defined. If a class and a given route handler function both have this decorator
applied, the class ACL will be listed as the parent to the function's ACL object, thus inheriting
whatever permissions applied to the class level.
Parameters
acl?
PartialACL = ...
The access control list to define for this route class or handler. Not specifying a value here
- will default to the behavior of denying anonymous access to the resource and allowing any authenticated
- user CRUD access.
Returns
(target, propertyKey?) => void