Liking cljdoc? Tell your friends :D

cerber.roles

An API with all the functions for roles- and permissions creation and assertion.

An API with all the functions for roles- and permissions creation and assertion.
raw docstring

has-permission?clj/s

(has-permission? subject permission)

Returns true if subject holds given permission, returns false otherwise.

Returns true if subject holds given permission, returns false otherwise.
sourceraw docstring

has-role?clj/s

(has-role? subject role)

Returns true if subject has given role assigned, returns false otherwise.

Returns true if subject has given role assigned, returns false otherwise.
sourceraw docstring

implied-by?clj/s

(implied-by? permission permissions)
source

init-rolesclj

(init-roles roles)

Returns a mapping between roles and set of permissions. Nested roles, that means ones which map to other roles, are unrolled and flattened into union of respective permissions.

Returns a mapping between roles and set of permissions. Nested roles,
that means ones which map to other roles, are unrolled and flattened into
union of respective permissions.
sourceraw docstring

wrap-permissionsclj

(wrap-permissions handler roles-mapping & [scopes->roles])

Sets up user's permissions and roles.

Sets up user's permissions and roles.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close