new Storage()
Storage constructor
Members
-
rbacRBAC null
-
Get instance of RBAC
Methods
-
add(item, cb){Storage}
-
Add permission or role
Name Type Description item
Base Instance of role or permission cb
function Callback function Returns:
of actual storage
-
exists(name, cb){Storage}
-
Return true with callback if role or permission exists
Name Type Description name
String Name of role or permission cb
function Callback function Returns:
of actual storage
-
existsPermission(name, cb){Storage}
-
Return true with callback if permission exists
Name Type Description name
String Name of permission cb
function Callback function Returns:
of actual storage
-
existsRole(name, cb){Storage}
-
Return true with callback if role exists
Name Type Description name
String Name of role cb
function Callback function Returns:
of actual storage
-
get(name, cb){Storage}
-
Get instance of permission or role by his name
Name Type Description name
String Name of role or permission cb
function Callback function Returns:
of actual storage
-
getGrants(role, cb){Storage}
-
Get instances of Roles and Permissions assigned to role
Name Type Description role
String Name of role cb
function Callback function Returns:
of actual storage
-
getPermission(action, resource, cb){Storage}
-
Get instance of permission by his name
Name Type Description action
String Name of action resource
String Name of resource cb
function Callback function Returns:
of actual storage
-
getPermissions(cb){Storage}
-
Get all instances of Permissions
Name Type Description cb
function Callback function Returns:
of actual storage
-
getRole(name, cb){Storage}
-
Get instance of role by his name
Name Type Description name
String Name of role cb
function Callback function Returns:
of actual storage
-
getRoles(cb){Storage}
-
Get all instances of Roles
Name Type Description cb
function Callback function Returns:
of actual storage
-
grant(role, child, cb){Storage}
-
Add (grant) permission or role to hierarchy of actual role
Name Type Description role
Role Instance of role child
Base Instance of role or permission cb
function Callback function Returns:
of actual storage
-
remove(item, cb){Storage}
-
Remove permission or role
Name Type Description item
Base Instance of role or permission cb
function Callback function Returns:
of actual storage
-
revoke(role, child, cb){Storage}
-
Remove (revoke) permission or role from hierarchy of actual role
Name Type Description role
Role Instance of role child
Base Instance of role or permission cb
function Callback function Returns:
of actual storage