Acl
class Secured {
// allows any administrator or account holder with matching email addresses.
// service account emails take the form `${serviceAccount.name}@${org.code}-iam.serviceaccount.medable.com`
@acl(
'role', consts.roles.Administrator,
'account', ['[email protected]', 'sample@$env123-iam.serviceaccount.medable.com']
)
foo() {
}
// fails unless the first argument equals a particular value and the method caller is [email protected]
@acl('assert', (principal, arg1) => arg1 === 'knock knock' && principal.email === '[email protected]' )
bar(arg1, arg2) {
}
}@acl( type, options, ... )
Last updated
Was this helpful?