feat(accounts): implement user accounts, sessions, and dashboards
All checks were successful
Build and Publish Docker Image / deploy (push) Successful in 1m8s
All checks were successful
Build and Publish Docker Image / deploy (push) Successful in 1m8s
Introduce Stage 4 features to support multi-user accounts, cookie-based web sessions, and personal dashboards. Changes include: - Adding `/register` to bootstrap the first admin account and `/login`/`/logout` for session management. - Creating a personal dashboard (`/app`) to display owned boxes, storage usage, and upload history. - Implementing admin user management (`/admin/users`) for generating invite links and managing user states. - Updating the bbolt database schema to store users, sessions, invites, and collections. - Adding `golang.org/x/crypto` for password hashing and introducing unit tests for account handlers.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
<h1 id="admin-title">Admin overview</h1>
|
||||
</div>
|
||||
<form action="/admin/logout" method="post">
|
||||
<a class="button button-outline" href="/admin/users">Users</a>
|
||||
<button class="button button-outline" type="submit">Logout</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -54,6 +55,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Box</th>
|
||||
<th>Owner</th>
|
||||
<th>Files</th>
|
||||
<th>Size</th>
|
||||
<th>Downloads</th>
|
||||
@@ -67,6 +69,7 @@
|
||||
{{range .Data.Boxes}}
|
||||
<tr>
|
||||
<td><code>{{.ID}}</code></td>
|
||||
<td>{{.Owner}}</td>
|
||||
<td>{{.FileCount}}</td>
|
||||
<td>{{.TotalSizeLabel}}</td>
|
||||
<td>{{.DownloadCount}}{{if .MaxDownloads}} / {{.MaxDownloads}}{{end}}</td>
|
||||
@@ -84,7 +87,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
{{else}}
|
||||
<tr><td colspan="8">No uploads yet.</td></tr>
|
||||
<tr><td colspan="9">No uploads yet.</td></tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user