Liking cljdoc? Tell your friends :D

cerber.impl.roles


add-dependenciesclj

(add-dependencies graph role-name roles)
source

build-dependency-graphclj

(build-dependency-graph roles-kv)
source

populate-roles-and-permissionsclj

(populate-roles-and-permissions subject client roles-mapping transitions)

Updates subject's roles and permissions according to following rules:

  • if a client is given (which assumes client-originated request) roles are calculated based on client's scopes-to-roles transitions map and intersected with subject's own roles. Next, based on resulting roles, permissions are calculated and assigned finally to subject.

  • if no client is given (which assumes user-originated request) subject's roles stay untouched. Permissions are being calculated and merged with own subject's ones (if any).

General idea behind these two rules is: when client's scopes are available use them to deduce roles and permissions, otherwise use own subject's roles to calculate final permissions.

Updates subject's roles and permissions according to following rules:

- if a client is given (which assumes client-originated request) roles are calculated
based on client's scopes-to-roles transitions map and intersected with subject's own roles.
Next, based on resulting roles, permissions are calculated and assigned finally to subject.

- if no client is given (which assumes user-originated request) subject's roles stay
untouched. Permissions are being calculated and merged with own subject's ones (if any).

General idea behind these two rules is: when client's scopes are available use them to deduce
roles and permissions, otherwise use own subject's roles to calculate final permissions.
sourceraw docstring

replace-wildcard-rolesclj

(replace-wildcard-roles roles-or-permissions roles-names)
source

replace-with-permissionsclj

(replace-with-permissions roles-or-permissions roles-kv)
source

resolve-permissionsclj

(resolve-permissions {:keys [roles dependencies]})
source

role-str?clj

(role-str? str)
source

roles->permissionsclj

source

roles->permissions*clj

(roles->permissions* roles roles-mapping)

Unrolls roles into corresponding set of permissions.

Unrolls roles into corresponding set of permissions.
sourceraw docstring

roles-by-domainclj

(roles-by-domain domain roles-names)
source

unroll-rolesclj

(unroll-roles roles)

Walks through role-to-permissions mappings unrolling every nested role with flat set of permissions.

Walks through role-to-permissions mappings unrolling every nested
role with flat set of permissions.
sourceraw docstring

unwind-wildcard-rolesclj

(unwind-wildcard-roles roles)
source

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

× close