Liking cljdoc? Tell your friends :D

dev.gethop.rbac.next


add-child-contexts!clj

(add-child-contexts! db-spec context child-contexts)

FIXME FIXME FIXME FIXME

FIXME FIXME FIXME FIXME
sourceraw docstring

add-parent-contexts!clj

(add-parent-contexts! db-spec context parent-contexts)
source

add-super-admin!clj

(add-super-admin! db-spec user-id)
source

assign-role!clj

(assign-role! db-spec {:keys [role context user]})
source

assign-roles!clj

(assign-roles! db-spec role-assignments)
source

create-context!clj

(create-context! db-spec context parent-contexts)

Create a context, in the database specified by db-spec.

db-spec is a :next.jdbc.specs/db-spec compliant value.

context is a map with the following keys and values: :resource-id The application id that identifies the resource for which the context is created. :context-type-name The name of the context type to use for this context. It must be a valid context-type-name previously created using create-context-type! E.g., {:resource-id #uuid "28b81079-a2b7-419d-92b1-7249bc326ea1" :context-type-name "device"}

parent-contexts is a collection of already existing contexts, that will be set as the parents for context. To be able to create a top-level context, pass an empty collection.

Create a `context`, in the database specified by `db-spec`.

`db-spec` is a `:next.jdbc.specs/db-spec` compliant value.

`context` is a map with the following keys and values:
   :resource-id The application id that identifies the resource for
                which the context is created.
   :context-type-name The name of the context type to use for this
                      context. It must be a valid context-type-name
                      previously created using `create-context-type!`
 E.g.,
   {:resource-id #uuid "28b81079-a2b7-419d-92b1-7249bc326ea1"
    :context-type-name "device"}

`parent-contexts` is a collection of already existing contexts, that
will be set as the parents for `context`. To be able to create a
top-level context, pass an empty collection.
sourceraw docstring

create-context-type!clj

(create-context-type! db-spec context-type)
source

create-context-types!clj

(create-context-types! db-spec context-types)
source

create-permission!clj

(create-permission! db-spec permission)
source

create-permissions!clj

(create-permissions! db-spec permissions)
source

create-role!clj

(create-role! db-spec role)

Create a role, in the database specified by db-spec.

db-spec is a :next.jdbc.specs/db-spec compliant value. role is a map with the following keys and values:

:name A mandatory key which contains a keyword with the role name. :description An optional key which contains a string with the description of the role.

E.g., {:name :asset-manager :description "Role used to manage the assets in the application"}

Create a `role`, in the database specified by `db-spec`.

`db-spec` is a `:next.jdbc.specs/db-spec` compliant value.
`role` is a map with the following keys and values:

 :name A mandatory key which contains a keyword with the role name.
 :description An optional key which contains a string with the
              description of the role.

E.g.,
   {:name        :asset-manager
    :description "Role used to manage the assets in the application"}
sourceraw docstring

create-roles!clj

(create-roles! db-spec roles)

Create a collection of roles, in the database specified by db-spec.

db-spec is a :next.jdbc.specs/db-spec compliant value. roles is collection of role, as specified in create-role!

Create a collection of `roles`, in the database specified by `db-spec`.

`db-spec` is a `:next.jdbc.specs/db-spec` compliant value.
`roles` is collection of `role`, as specified in `create-role!`
sourceraw docstring

delete-context!clj

(delete-context! db-spec {:keys [context-type-name resource-id]})
source

delete-context-type!clj

(delete-context-type! db-spec context-type)
source

delete-context-types!clj

(delete-context-types! db-spec context-types)
source

delete-contexts!clj

(delete-contexts! db-spec contexts)

FIXME FIXME FIXME FIXME

FIXME FIXME FIXME FIXME
sourceraw docstring

delete-permission!clj

(delete-permission! db-spec permission)
source

delete-permission-by-id!clj

(delete-permission-by-id! db-spec id)
source

delete-permission-by-name!clj

(delete-permission-by-name! db-spec name)
source

delete-permissions!clj

(delete-permissions! db-spec permissions)
source

delete-permissions-by-ids!clj

(delete-permissions-by-ids! db-spec ids)
source

delete-permissions-by-names!clj

(delete-permissions-by-names! db-spec names)
source

delete-role!clj

(delete-role! db-spec role)

Delete role definition, from the db using db-spec connection

db-spec is a :next.jdbc.specs/db-spec compliant value. role is a map, as specified in create-role!. Except in this case, the role id is mandatory.

Delete `role` definition, from the db using `db-spec` connection

`db-spec` is a `:next.jdbc.specs/db-spec` compliant value.
`role` is a map, as specified in `create-role!`. Except
in this case, the role `id` is mandatory.
sourceraw docstring

delete-role-by-id!clj

(delete-role-by-id! db-spec role-id)

Delete role whose id is role-id, from the db using db-spec connection

db-spec is a :next.jdbc.specs/db-spec compliant value.

Delete `role` whose id is `role-id`, from the db using `db-spec` connection

`db-spec` is a `:next.jdbc.specs/db-spec` compliant value.
sourceraw docstring

delete-role-by-name!clj

(delete-role-by-name! db-spec name)

Delete role whose name is name, from the db using db-spec connection

db-spec is a :next.jdbc.specs/db-spec compliant value.

Delete `role` whose name is `name`, from the db using `db-spec` connection

`db-spec` is a `:next.jdbc.specs/db-spec` compliant value.
sourceraw docstring

delete-roles!clj

(delete-roles! db-spec roles)

Delete roles definitions, from the db using db-spec connection

db-spec is a :next.jdbc.specs/db-spec compliant value. roles is a collection of maps, as specified in create-role!. Except in this case, the role id is mandatory.

Delete `roles` definitions, from the db using `db-spec` connection

`db-spec` is a `:next.jdbc.specs/db-spec` compliant value.
`roles` is a collection of maps, as specified in
`create-role!`. Except in this case, the role `id` is mandatory.
sourceraw docstring

delete-roles-by-ids!clj

(delete-roles-by-ids! db-spec ids)
source

delete-roles-by-names!clj

(delete-roles-by-names! db-spec names)
source

deny-role-permission!clj

(deny-role-permission! db-spec role permission)
source

deny-role-permissions!clj

(deny-role-permissions! db-spec role permissions)
source

get-contextclj

(get-context db-spec context-type-name resource-id)
source

get-context-typeclj

(get-context-type db-spec context-type-name)
source

get-context-typesclj

(get-context-types db-spec)
source

get-contextsclj

(get-contexts db-spec)
source

get-contexts-by-selectorsclj

(get-contexts-by-selectors db-spec context-selectors)
source

get-permission-by-idclj

(get-permission-by-id db-spec id)
source

get-permission-by-nameclj

(get-permission-by-name db-spec name)
source

get-permissionsclj

(get-permissions db-spec)
source

get-role-assignments-by-userclj

(get-role-assignments-by-user db-spec user-id)
(get-role-assignments-by-user db-spec user-id context-id)
source

get-role-by-idclj

(get-role-by-id db-spec role-id)

Get the role whose id is role-id, from the db using db-spec connection

db-spec is a :next.jdbc.specs/db-spec compliant value.

Get the role whose id is `role-id`, from the db using `db-spec` connection

`db-spec` is a `:next.jdbc.specs/db-spec` compliant value.
sourceraw docstring

get-role-by-nameclj

(get-role-by-name db-spec name)

Get the role whose name is name, from the db using db-spec connection

db-spec is a :next.jdbc.specs/db-spec compliant value.

Get the role whose name is `name`, from the db using `db-spec` connection

`db-spec` is a `:next.jdbc.specs/db-spec` compliant value.  
sourceraw docstring

get-rolesclj

(get-roles db-spec)

Get all role definitions, from the db using db-spec connection

db-spec is a :next.jdbc.specs/db-spec compliant value.

Get all role definitions, from the db using `db-spec` connection

`db-spec` is a `:next.jdbc.specs/db-spec` compliant value.  
sourceraw docstring

get-roles-by-namesclj

(get-roles-by-names db-spec names)

Get the roles whose name is in names, from the db using db-spec connection

db-spec is a :next.jdbc.specs/db-spec compliant value.

Get the roles whose name is in `names`, from the db using `db-spec` connection

`db-spec` is a `:next.jdbc.specs/db-spec` compliant value.  
sourceraw docstring

grant-role-permission!clj

(grant-role-permission! db-spec role permission)
source

grant-role-permissions!clj

(grant-role-permissions! db-spec role permissions)
source

has-permission?clj

(has-permission? db-spec user-id resource-id context-type-name permission-name)
source

remove-child-contexts!clj

(remove-child-contexts! db-spec context child-contexts)

FIXME FIXME FIXME FIXME

FIXME FIXME FIXME FIXME
sourceraw docstring

remove-parent-contexts!clj

(remove-parent-contexts! db-spec context parent-contexts)
source

remove-role-permission!clj

(remove-role-permission! db-spec role permission)
source

remove-role-permissions!clj

(remove-role-permissions! db-spec role permissions)
source

remove-super-admin!clj

(remove-super-admin! db-spec user-id)
source

super-admin?clj

(super-admin? db-spec user-id)
source

unassign-role!clj

(unassign-role! db-spec {:keys [role context user]})
source

unassign-roles!clj

(unassign-roles! db-spec unassignments)
source

update-context!clj

(update-context! db-spec context)
source

update-context-type!clj

(update-context-type! db-spec context-type)
source

update-context-types!clj

(update-context-types! db-spec context-types)
source

update-contexts!clj

(update-contexts! db-spec contexts)
source

update-permission!clj

(update-permission! db-spec permission)
source

update-permissions!clj

(update-permissions! db-spec permissions)
source

update-role!clj

(update-role! db-spec role)

Update role definitionn, in the db using db-spec connection

db-spec is a :next.jdbc.specs/db-spec compliant value. role is a map, as specified in create-role!. Except in this case, the role id is mandatory.

Update `role` definitionn, in the db using `db-spec` connection

`db-spec` is a `:next.jdbc.specs/db-spec` compliant value.
`role` is a map, as specified in `create-role!`. Except
in this case, the role `id` is mandatory.
sourceraw docstring

update-roles!clj

(update-roles! db-spec roles)

Update a collection of roles, in the db using db-spec connection

db-spec is a :next.jdbc.specs/db-spec compliant value. roles is collection of role, as specified in create-role!. Except in this case, the role id is mandatory.

Update a collection of `roles`, in the db using `db-spec` connection

`db-spec` is a `:next.jdbc.specs/db-spec` compliant value.
`roles` is collection of `role`, as specified in
`create-role!`. Except in this case, the role `id` is mandatory.
sourceraw docstring

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

× close