Skip to content
Luiz Henrique Canet Filho edited this page May 19, 2020 · 1 revision

access-controller

modnes Access Controller

Meta

User

User object with optional roles property as array

Type: Object

Constraints

Constraints object with roles and/or functions property as array

Type: Object

constraintFunction

This is called when cheking functions

Type: Function

Parameters

Returns Boolean

AccessController

AccessController

hasAccess

Check if an user has access against constraints

Parameters

Returns Boolean

userHasRoles

Checks if the user has any of the roles

Parameters

Returns Boolean

callFunctions

Check if all functions returns true

Parameters

Returns Boolean

Clone this wiki locally