(contains-matching-permission-in-roles? roles p mapping)
(init-roles roles-map)
Returns a mapping between roles and set of Permissions based on initial roles-map. Nested roles (ones which map to other roles) get unrolled into union of respective permissions.
Returns a mapping between roles and set of Permissions based on initial roles-map. Nested roles (ones which map to other roles) get unrolled into union of respective permissions.
(make-permission perm-str)
Build a Permission based on its stringified form like 'user:write'.
Build a Permission based on its stringified form like 'user:write'.
(permissions-by-role mapping role)
Filters role-to-permissions mapping according to given role which can be exact or wildcard one. Returns list of [role permissions].
Filters role-to-permissions mapping according to given role which can be exact or wildcard one. Returns list of [role permissions].
(strings->permissions strings)
Transforms collections of stringified permissions into set of Permissions.
Transforms collections of stringified permissions into set of Permissions.
(unroll-roles {:keys [mapping dependencies] :as roles})
Walks through role-to-permissions mapping unrolling nested roles. Returns same mapping with all nested roles replaced by corresponding permissions.
Walks through role-to-permissions mapping unrolling nested roles. Returns same mapping with all nested roles replaced by corresponding permissions.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close