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:
23
internal/templates/hx_smb_shares.html
Normal file
23
internal/templates/hx_smb_shares.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{{define "hx_smb_shares"}}
|
||||
<div>
|
||||
<table class="min-w-full bg-white">
|
||||
<thead>
|
||||
<tr><th>Name</th><th>Path</th><th>Type</th><th>Options</th><th></th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .}}
|
||||
<tr class="border-t"><td>{{.Name}}</td><td>{{.Path}}</td><td>{{.Type}}</td><td>{{range $k,$v := .Config}}{{$k}}={{$v}} {{end}}</td>
|
||||
<td>
|
||||
<form hx-post="/shares/smb/delete" hx-swap="outerHTML" class="inline">
|
||||
<input type="hidden" name="id" value="{{.ID}}" />
|
||||
<button class="px-2 py-1 bg-red-500 text-white rounded text-xs">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{else}}
|
||||
<tr><td colspan="5">No SMB shares</td></tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user