1.0.3 • Published 9 years ago
@sazze/acl v1.0.3
ACL
Access Control Library
Usage
var acl = require('@sazze/acl')(config);
var levels = acl.LEVELS;
API
acl.isLevelName(level: Integer): Boolean
Checks if the given level is >= the value corresponding to the LevelName
acl.eqLevelName(level: Integer): Boolean
Checks if the given level is == the value corresponding to the LevelName
acl.isAtLeast(levelYouHave: Integer, levelYouWant: Integer): Boolean
Checks if the levelYouHave >= the levelYouWant it to be
acl.getAvailableLevels(levelYouHave: Integer): Array
Returns and array of all levels this user has access to