feat(admin): add box preview and password bypass for administrators
Introduce an `AdminViewBox` handler and route that allows administrators to view any box directly. If the box is password-protected, the handler bypasses the protection by setting an unlock cookie with an unlock token and logs the bypass event. Additionally, add CSS and JS foundations for a file context menu and preview actions in the file browser UI.
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
{{if .Protected}}<span class="badge">protected</span>{{end}}
|
||||
</td>
|
||||
<td class="table-actions">
|
||||
<a class="button button-outline" href="/d/{{.ID}}">View</a>
|
||||
<a class="button button-outline" href="/admin/boxes/{{.ID}}/view">View</a>
|
||||
<form action="/admin/boxes/{{.ID}}/delete" method="post">
|
||||
<button class="button button-danger" type="submit">Delete</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user