You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 20, 2024. It is now read-only.
Casper Rasmussen edited this page Mar 12, 2017
·
1 revision
The backend_users have a role which indicates their user level
The roles can be configured in the adminpanel.json
Index 0 in the array is highest user level and last in array is lowest
Here is some examples of using the gate system
swift
Gate.allow(backendUser,"super-admin") // Returns Bool
Gate.disallow(backendUser,"super-admin") // Returns Bool
tryGate.allowOrFail(backendUser,"super-admin") // throws a 403 if user does not have access
Gate.allow(request,"super-admin") // Returns Bool
Gate.disallow(request,"super-admin") // Returns Bool
tryGate.allowOrFail(request,"super-admin") // throws a 403 if user does not have access