Adding ACL Modificationf for existing roles

This commit is contained in:
Ian Roddis committed 2026-06-24 22:01:25 -03:00
1 parent 35e8a61b1d
commit 78efe32b69
4 files changed
+93 -14

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
<tr id="role-{{ r.id }}">
<td colspan="5">
<form hx-post="/admin/roles/{{ r.id }}"
hx-target="#role-{{ r.id }}"
hx-swap="outerHTML"
class="inline-edit">
<span class="muted">#{{ r.id }} · {{ r.name }}</span>
<fieldset class="roles-field">
<legend>Permissions</legend>
{% for perm in permissions %}
<label class="check">
<input type="checkbox" name="permission_ids" value="{{ perm.id }}"
{{ "checked" if perm in r.permissions }}> {{ perm.name }}
</label>
{% endfor %}
</fieldset>
<div class="row-actions">
<button type="submit" class="btn btn-primary">Save</button>
<button type="button" class="btn btn-ghost"
hx-get="/admin/roles/{{ r.id }}/row"
hx-target="#role-{{ r.id }}"
hx-swap="outerHTML">Cancel</button>
</div>
</form>
</td>
</tr>