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

apply-formclj

(apply-form cls label action fields & inputs)

A wizard option's form, classed cls, posting fields, {name value}, to action, label on its button: the option shows its preview, so a change posts confirmed.

A wizard option's form, classed `cls`, posting `fields`, {name value}, to
`action`, `label` on its button: the option shows its preview, so a change
posts confirmed.
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, :grant (BOU-853) or :revoke (BOU-1001): only explaining asks everywhere; granting reads an empty scope as everywhere. inputs go before its button.

The form posting to `action` a permission on a record, `kind` `:explain`,
`:grant` (BOU-853) or `:revoke` (BOU-1001): only explaining asks
`everywhere`; granting reads an empty scope as 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-lineclj

(assignment-line {:keys [role scope]} scope-info)

"Assign <role> <scope>", as a wizard option names an assignment.

"Assign <role> <scope>", as a wizard option names an assignment.
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, :mode the authorization mode.

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, `:mode` the authorization mode.
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

module-standingclj

(module-standing registry roles held)

What held, a set of permissions, gives in each module of registry {p {:label :module}}: {:module :held :total :level :permissions}, sorted by module. :level is the highest code role level whose permissions, over every code role of that level in the module, held covers: a module with a viewer role per entity reads as viewer only when all of them are held. :permissions is [{:permission :label :held?}] (BOU-1000). roles as role-index gives them.

What `held`, a set of permissions, gives in each module of `registry`
{p {:label :module}}: {:module :held :total :level :permissions}, sorted
by module. :level is the highest code role level whose permissions, over
every code role of that level in the module, `held` covers: a module with
a viewer role per entity reads as viewer only when all of them are held.
:permissions is [{:permission :label :held?}] (BOU-1000). `roles` as
`role-index` gives them.
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

revoke-pathclj

(revoke-path user-id permission)

The wizard taking permission away from user-id (BOU-1001).

The wizard taking `permission` away from `user-id` (BOU-1001).
sourceraw docstring

rights-pageclj

(rights-page user groups grants opts)

At a glance, what user may do per module and whether they open the admin pages; every permission, held or not, with the way to its reason; their roles (BOU-1000). Then 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).

At a glance, what `user` may do per module and whether they open the admin
pages; every permission, held or not, with the way to its reason; their
roles (BOU-1000). Then `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-moduleclj

(role-module roles role-name)

The module role role-name belongs to, roles as role-index gives them: the access overview's column, not its name's namespace.

The module role `role-name` belongs to, `roles` as `role-index` gives
them: the access overview's column, not its name's namespace.
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

scoped-onlyclj

(scoped-only grants)

The permissions grants give only within a scope, never everywhere.

The permissions `grants` give only within a scope, never everywhere.
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

usable-grantsclj

(usable-grants grants resolved)

grants the user can use: one whose scope takes a value from a user source counts only when that source resolved to values, as enforcement drops it otherwise. resolved as scope-view reads it (BOU-1000).

`grants` the user can use: one whose scope takes a value from a user
source counts only when that source resolved to values, as enforcement
drops it otherwise. `resolved` as `scope-view` reads it (BOU-1000).
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

users-pathclj

The one user list (BOU-1003).

The one user list (BOU-1003).
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