Page Contents

Home > @loopback/authorization > authorize > allow

authorize.allow() function

Shortcut to configure allowed roles

Signature:

allow: (...roles: string[]) => (target: any, method?: string, methodDescriptor?: TypedPropertyDescriptor<any>) => any

Parameters

Parameter Type Description

roles

string[]

Returns:

(target: any, method?: string, methodDescriptor?: TypedPropertyDescriptor<any>) => any