allowed

fun <Resource : Any> allowed(principal: Principal, resource: Resource, vararg actions: ResourceAction<Resource>): Boolean

Returns a boolean indicating whether the principal is allowed all of the specified actions against the resource. Use this method when you wish to perform a permission check and handle a boolean value rather than an exception.

Return

true if all actions are allowed, false otherwise.

Parameters

principal

The principal attempting to access the resource.

resource

The resource being accessed.

actions

The actions being performed on the resource.