web permission system updated

This commit is contained in:
Priec
2026-08-09 18:49:54 +02:00
parent fd551ef7fb
commit ff044d65f1
12 changed files with 40 additions and 34 deletions

View File

@@ -13,6 +13,8 @@
<div class="actions"><a href="/admin">← Admin panel</a></div>
</section>
{% if page.updated %}<p class="notice">Authorization updated. The current session remains valid and all subsequent requests use the new policy.</p>{% endif %}
{% if page.can_manage_roles %}
<section class="panel">
<h2>Data roles</h2>

View File

@@ -154,7 +154,7 @@
{% if !page.permission_object.is_empty() %}
<section class="panel">
<h2>Data permissions for <code>{{ page.selection.table }}</code></h2>
<p class="hint">These grants cover this table family. A successful change retires the current session, so you will be asked to sign in again.</p>
<p class="hint">These grants cover this table family and take effect on subsequent requests without replacing the current session.</p>
<table class="builder-table">
<thead><tr><th>Role</th><th>Actions</th></tr></thead>
<tbody>{% for role in page.role_permissions %}<tr>

View File

@@ -8,7 +8,6 @@
<form class="login-card" hx-post="/login" hx-target="#login-status" hx-swap="innerHTML"
hx-disabled-elt="button" novalidate>
<h1>Sign in</h1>
{% if permissions_changed %}<p class="notice">Authorization changed successfully. Sign in again because the server retired the previous session.</p>{% endif %}
{% if initial_password_set %}<p class="notice">The initial password was set. You can sign in now.</p>{% endif %}
<label>Username or email<input name="identifier" autocomplete="username"></label>
<label>Password <span>(optional)</span><input name="password" type="password" autocomplete="current-password"></label>