Liking cljdoc? Tell your friends :D

wagoe.user.core.rights-ui

Admin pages answering who may do what (ADR-041 §7): roles, permissions and a user's rights. Pure Hiccup in the admin shell; plain forms that post and redirect.

Admin pages answering who may do what (ADR-041 §7): roles, permissions and
a user's rights. Pure Hiccup in the admin shell; plain forms that post and
redirect.
raw docstring

action-tableclj

(action-table headers rows)

A table whose last column holds each row's actions, as the admin's lists have it.

A table whose last column holds each row's actions, as the admin's lists have it.
sourceraw docstring

asking-formclj

(asking-form kind
             action
             registry
             scope-keys
             {:keys [permission record]}
             &
             inputs)

The form posting to action a permission on a record, kind :explain or :grant (BOU-853): granting asks no everywhere, an empty scope is everywhere. inputs go before its button.

The form posting to `action` a permission on a record, `kind` `:explain`
or `:grant` (BOU-853): granting asks no `everywhere`, an empty scope is
everywhere. `inputs` go before its button.
sourceraw docstring

asking-paramsclj

(asking-params permission record)

permission on record, {scope-key value} or :everywhere, as the asking forms post them.

`permission` on `record`, {scope-key value} or `:everywhere`, as the asking
forms post them.
sourceraw docstring

assignment-sentenceclj

(assignment-sentence {:keys [group-id group-name role scope expires-at]}
                     roles
                     scope-info)

assignment, {:group-id :group-name :role :scope :expires-at}, as a sentence: "Sales may edit orders within Department Noord". roles: {role-name role} as list-roles gives them, to read a code role's level.

`assignment`, {:group-id :group-name :role :scope :expires-at}, as a
sentence: "Sales may edit orders within Department Noord". `roles`:
{role-name role} as `list-roles` gives them, to read a code role's level.
sourceraw docstring

codeclj

(code x)
source

create-modalclj

(create-modal id title opts form)

The form a list's New button opens; open at once when it was refused.

The form a list's New button opens; open at once when it was refused.
sourceraw docstring

detail-tabsclj

This module's pages for a user, beside the admin's edit page. The admin's :users config names this var as its :detail-tabs; {id} is the user's.

This module's pages for a user, beside the admin's edit page. The admin's
`:users` config names this var as its `:detail-tabs`; `{id}` is the user's.
sourceraw docstring

effective-scope-viewclj

(effective-scope-view scope {:keys [labels]})

A resolved scope, {key #{value}}, as text.

A resolved scope, {key #{value}}, as text.
sourceraw docstring

entity-lookup-urlclj

(entity-lookup-url entity)

Where the admin answers lookups of entity's rows: by text, or one by ?id=.

Where the admin answers lookups of `entity`'s rows: by text, or one by ?id=.
sourceraw docstring

expiry-dateclj

(expiry-date expires-at)

The UTC date expires-at, an Instant, falls on: what an expiry is entered and shown as (BOU-856).

The UTC date `expires-at`, an Instant, falls on: what an expiry is entered
and shown as (BOU-856).
sourceraw docstring

expiry-inputclj

(expiry-input id value)

The optional expiry date of a membership or assignment, posted as expires-at.

The optional expiry date of a membership or assignment, posted as `expires-at`.
sourceraw docstring

expiry-noteclj

(expiry-note expires-at)

"expires on 2026-11-15", or nil for access that does not end.

"expires on 2026-11-15", or nil for access that does not end.
sourceraw docstring

explain-pageclj

(explain-page user result opts)

Why user may or may not use the permission asked, result as explain-access gives it, nil before one is asked. opts: :asked {:permission :record}, :registry the permissions to pick from, :scope-info as scope-view reads it.

Why `user` may or may not use the permission asked, `result` as
`explain-access` gives it, nil before one is asked. `opts`: `:asked`
{:permission :record}, `:registry` the permissions to pick from,
`:scope-info` as `scope-view` reads it.
sourceraw docstring

explain-pathclj

(explain-path user-id permission record)

The explain page for user-id, asking permission on record: {scope-key value}, or :everywhere for a route without a scope.

The explain page for `user-id`, asking `permission` on `record`: {scope-key
value}, or `:everywhere` for a route without a scope.
sourceraw docstring

grant-bulk-pathclj

Who a permission would refuse, and the smallest fix for each (BOU-853).

Who a permission would refuse, and the smallest fix for each (BOU-853).
sourceraw docstring

grant-pathclj

(grant-path user-id permission scope)

The grant wizard for user-id, giving permission in scope, {scope-key value}, {} or nil for everywhere (BOU-853).

The grant wizard for `user-id`, giving `permission` in `scope`, {scope-key
value}, {} or nil for everywhere (BOU-853).
sourceraw docstring

group-pathclj

(group-path group-id)
source

groups-pathclj

source

(header crumbs heading & actions)

Breadcrumbs, crumbs [label href] pairs, the page's actions and heading.

Breadcrumbs, `crumbs` [label href] pairs, the page's `actions` and `heading`.
sourceraw docstring

hidden-fieldsclj

(hidden-fields params)

params, form params, as hidden inputs: a vector is one per value.

`params`, form params, as hidden inputs: a vector is one per value.
sourceraw docstring

level-labelsclj

A code role's level, as role-level names it, as a badge says it.

A code role's level, as `role-level` names it, as a badge says it.
sourceraw docstring

list-fragmentclj

(list-fragment spec items table-query)

What a list's own search and sort get back: the table, the count out of band.

What a list's own search and sort get back: the table, the count out of band.
sourceraw docstring

list-pageclj

(list-page title intro content opts)

A list in the admin shell, title in its topbar, intro above it.

A list in the admin shell, `title` in its topbar, `intro` above it.
sourceraw docstring

list-rowclj

(list-row href attrs columns cells)

A list row opening href: its cells under the columns labels, the title link first, a chevron last.

A list row opening `href`: its `cells` under the `columns` labels, the
title link first, a chevron last.
sourceraw docstring

list-viewclj

(list-view {:keys [id url placeholder signals] :as spec}
           items
           table-query
           &
           actions)

A list as the admin's entity lists have it: count, search and actions over the sortable table.

A list as the admin's entity lists have it: count, search and `actions`
over the sortable table.
sourceraw docstring

module-ofclj

(module-of x module)

The module x belongs to: its declared module, else its name's namespace.

The module `x` belongs to: its declared `module`, else its name's namespace.
sourceraw docstring

noticeclj

(notice {:keys [error]})
source

pageclj

(page title content opts)

content in the admin shell, title in its topbar.

`content` in the admin shell, `title` in its topbar.
sourceraw docstring

permission-groupsclj

(permission-groups registry held)

registry permissions {p {:label :module}} by module, each [module-name [[p label checked?] ..]], sorted; held permissions the registry lacks come last under nil.

`registry` permissions {p {:label :module}} by module, each
[module-name [[p label checked?] ..]], sorted; `held` permissions the
registry lacks come last under nil.
sourceraw docstring

permission-itemsclj

(permission-items registry roles assignments)

The registry's permissions as permissions-list lists them, each with its hygiene/permission-signals over assignments.

The registry's permissions as `permissions-list` lists them, each with its
`hygiene/permission-signals` over `assignments`.
sourceraw docstring

permission-moduleclj

(permission-module registry p)

The module registry places permission p in.

The module `registry` places permission `p` in.
sourceraw docstring

permission-pageclj

(permission-page permission {:keys [label module]} roles holders opts)

One permission: the roles holding it, and the groups and users holding those.

One permission: the roles holding it, and the groups and users holding those.
sourceraw docstring

permission-pathclj

(permission-path permission)
source

permissions-listclj

The permissions list, by module, each permission with the roles holding it. Its items are {:permission :label :module :roles}; see permission-items.

The permissions list, by module, each permission with the roles holding
it. Its items are {:permission :label :module :roles}; see
`permission-items`.
sourceraw docstring

permissions-pageclj

(permissions-page items opts)

The registry by module, each permission with the roles holding it. items as permission-items gives them; (:table-query opts) searches and sorts them.

The registry by module, each permission with the roles holding it.
`items` as `permission-items` gives them; `(:table-query opts)` searches
and sorts them.
sourceraw docstring

permissions-pathclj

source

preview-pageclj

(preview-page preview {:keys [action fields back scope-info] :as opts})

What a change does to effective rights before it is made, preview as preview-change gives it, with a form posting (:fields opts) to (:action opts) again, confirmed. (:back opts): where cancel goes.

What a change does to effective rights before it is made, `preview` as
`preview-change` gives it, with a form posting `(:fields opts)` to
`(:action opts)` again, confirmed. `(:back opts)`: where cancel goes.
sourceraw docstring

preview-sectionsclj

(preview-sections {:keys [user permissions affected affected-count everyone?]}
                  scope-info)

What a change does to effective rights, preview as preview-change gives it: the named user's gains and losses, and the other users'.

What a change does to effective rights, `preview` as `preview-change`
gives it: the named user's gains and losses, and the other users'.
sourceraw docstring

rights-pageclj

(rights-page user groups grants opts)

user's groups, each with where the membership comes from, and their effective permissions, each with the group, role and scope it comes from. grants as user-grants gives them; (:scope-info opts) as scope-view reads it; (:registry opts), the declared permissions, places each in its module; (:roles opts), as role-index gives them, words each assignment. (:platform-admin? opts): the user passes every check. (:changes opts): the timeline of changes to their rights (BOU-855).

`user`'s groups, each with where the membership comes from, and their
effective permissions, each with the group, role and scope it comes from.
`grants` as `user-grants` gives them; `(:scope-info opts)` as `scope-view`
reads it; `(:registry opts)`, the declared permissions, places each in its
module; `(:roles opts)`, as `role-index` gives them, words each assignment.
`(:platform-admin? opts)`: the user passes every check. `(:changes opts)`:
the timeline of changes to their rights (BOU-855).
sourceraw docstring

role-indexclj

(role-index roles)

roles, as list-roles gives them, by name.

`roles`, as `list-roles` gives them, by name.
sourceraw docstring

role-levelclj

(role-level {:keys [name source]})

"viewer", "editor" or "manager" for one of a module's code roles, role as list-roles gives it; nil for any other role.

"viewer", "editor" or "manager" for one of a module's code roles,
`role` as `list-roles` gives it; nil for any other role.
sourceraw docstring

role-pageclj

(role-page {:keys [name description permissions source] :as role}
           registry
           holders
           opts)

One role: a code role read-only with a form to duplicate it, a managed one editable; then who holds it.

One role: a code role read-only with a form to duplicate it, a managed one
editable; then who holds it.
sourceraw docstring

role-pathclj

(role-path role-name)
source

roles-listclj

The roles list: by module, like the permissions.

The roles list: by module, like the permissions.
sourceraw docstring

roles-pageclj

(roles-page roles registry opts)

Code roles, locked, and managed ones, by module, with a form to compose a new one from the registry's permissions. (:table-query opts) searches and sorts them.

Code roles, locked, and managed ones, by module, with a form to compose a
new one from the registry's permissions. `(:table-query opts)` searches
and sorts them.
sourceraw docstring

roles-pathclj

source

scope-viewclj

(scope-view scope {:keys [labels entities sources resolved]})

A stored scope as text. info: {:labels {key label} :entities {key entity} :sources {source label} :resolved {[key source] values-or-:error}}, the last when the scope is a user's.

A stored scope as text. `info`: {:labels {key label} :entities {key entity}
:sources {source label} :resolved {[key source] values-or-:error}}, the
last when the scope is a user's.
sourceraw docstring

sectionclj

(section title & content)

content in a card under title. A map first is the section's attributes.

`content` in a card under `title`. A map first is the section's attributes.
sourceraw docstring

signal-badgesclj

(signal-badges signals item)

A badge per signal in signals, as wagoe.user.core.hygiene gives them for item.

A badge per signal in `signals`, as `wagoe.user.core.hygiene` gives them
for `item`.
sourceraw docstring

tableclj

(table headers rows)

A table of rows under headers.

A table of `rows` under `headers`.
sourceraw docstring

user-rights-pathclj

(user-rights-path user-id)
source

user-tabsclj

(user-tabs user-id active)

A user's pages as tabs: the admin's edit page, then detail-tabs, the one whose :key is active marked.

A user's pages as tabs: the admin's edit page, then `detail-tabs`, the one
whose :key is `active` marked.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close