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,22 @@
{{define "content"}}
<div class="bg-white rounded shadow p-4">
<h1 class="text-2xl font-bold">NFS Shares</h1>
<div class="mt-4">
<button class="px-3 py-2 bg-blue-500 text-white rounded" hx-get="/hx/shares/nfs" hx-swap="outerHTML" hx-target="#nfs-shares">Refresh</button>
</div>
<div id="nfs-shares" class="mt-4">
{{template "hx_nfs_shares" .}}
</div>
<div class="mt-6">
<h2 class="text-lg font-semibold">Create NFS Share</h2>
<form hx-post="/shares/nfs/create" hx-swap="afterbegin" class="mt-2">
<div class="flex space-x-2">
<input name="name" placeholder="share name" class="border rounded p-1" />
<input name="path" placeholder="dataset (e.g. tank/ds)" class="border rounded p-1" />
<input name="options" placeholder='{"clients":"*(rw)"}' class="border rounded p-1 w-64" />
<button class="px-3 py-1 bg-green-500 text-white rounded" type="submit">Create</button>
</div>
</form>
</div>
</div>
{{end}}