Build out the admin panel
- Overview: users, organizations, workspaces, spaces, pages, files and storage (org admins see their organization), plus pages open right now, the search index size, and version, uptime and database health. - Users: invite people by email (with resend, revoke and a copyable link when mail fails) and send a password-reset email. - Authentication: sign-up on or off, the email-domain allow-list, and sign-in links by email. - Branding: instance name, accent colour and logo. The web app shows them on the sign-in pages and applies the accent colour everywhere. - Email and Storage: SMTP and S3 settings with test buttons. - Maintenance: create, download and delete database backups, and a view of the background jobs with their last run, duration and errors. On the server, a small jobs registry records each search-indexing pass, and "search.rebuild" replaces the separate reindex endpoint. A new instance package serves the dashboard numbers, health and backups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
92cd81fd96
commit
ffc6cc4fbc
31 files changed
+2326
-134
No files matched your search
@@ -28,8 +28,8 @@ type Deps struct {
|
||||
Settings SettingsService
|
||||
// FileTokens signs the ?token= of file links; nil allows only bearer tokens.
|
||||
FileTokens *auth.FileTokens
|
||||
// Search is the full-text index (admin reindex); nil disables it.
|
||||
Search SearchIndex
|
||||
// Instance serves the admin dashboard, health, jobs and backups.
|
||||
Instance InstanceService
|
||||
// MaxUpload caps one attachment in bytes.
|
||||
MaxUpload int64
|
||||
// Collab serves /collab; nil disables live editing.
|
||||
@@ -60,7 +60,7 @@ func NewRouter(d Deps) http.Handler {
|
||||
|
||||
func newMux(d Deps) *routeMux {
|
||||
mux := &routeMux{ServeMux: http.NewServeMux()}
|
||||
a := &api{auth: d.Auth, dir: d.Directory, settings: d.Settings, files: d.FileTokens, index: d.Search, collab: d.Collab, log: d.Log}
|
||||
a := &api{auth: d.Auth, dir: d.Directory, settings: d.Settings, files: d.FileTokens, instance: d.Instance, collab: d.Collab, log: d.Log}
|
||||
a.routes(mux)
|
||||
a.fileRoutes(mux, max(d.MaxUpload, 1<<20))
|
||||
a.collabRoute(mux, d.CORSOrigins)
|
||||
|
||||
Reference in new issue
Block a user