-
Notifications
You must be signed in to change notification settings - Fork 0
API
Luiz Henrique Canet Filho edited this page May 19, 2020
·
1 revision
modnes Access Controller
Meta
- author: Luiz Henrique Canet Filho <me@luizca.net>
User object with optional roles property as array
Type: Object
Constraints object with roles and/or functions property as array
Type: Object
This is called when cheking functions
Type: Function
Parameters
-
user
User
Returns Boolean
AccessController
Check if an user has access against constraints
Parameters
-
user
User User object -
constraints
Constraints [description]
Returns Boolean
Checks if the user has any of the roles
Parameters
Returns Boolean
Check if all functions returns true
Parameters
-
user
User [description] -
functions
Array<constraintFunction> [description]
Returns Boolean