Add RBAC support with roles, permissions, and session management. Implement middleware for authentication and CSRF protection. Enhance audit logging with additional fields. Update HTTP handlers and routes for new features.

This commit is contained in:
2025-12-13 17:44:09 +00:00
parent d69e01bbaf
commit 8100f87686
44 changed files with 3262 additions and 76 deletions

View File

@@ -0,0 +1,32 @@
{{ define "hx_iscsi_luns" }}
<div>
<table class="w-full">
<thead><tr><th>LUN ID</th><th>ZVol</th><th>Size</th><th>Action</th></tr></thead>
<tbody>
{{ if . }}
{{ range . }}
<tr>
<td>{{ .lun_id }}</td>
<td>{{ .zvol }}</td>
<td>{{ .size }}</td>
<td>
<div>
<form hx-post="/api/iscsi/unmap_lun" hx-include="closest form" style="display:inline-block">
<input type="hidden" name="id" value="{{ .id }}" />
<button type="submit">Drain</button>
</form>
<form hx-post="/api/iscsi/delete_lun" hx-include="closest form" style="display:inline-block">
<input type="hidden" name="id" value="{{ .id }}" />
<input type="checkbox" name="force" id="force-{{ .id }}" value="1" />
<label for="force-{{ .id }}">Force delete</label>
<button type="submit">Delete</button>
</form>
</div>
</td>
</tr>
{{ end }}
{{ end }}
</tbody>
</table>
</div>
{{ end }}