Add users and network settings tabs with admin protections.

List and delete accounts with last-admin and Administrators-group guards, and expose editable network settings via the configuration UI.
This commit is contained in:
2026-07-18 15:18:01 +02:00
parent f049f766d9
commit 2605c3b346
49 changed files with 5440 additions and 209 deletions
+16
View File
@@ -0,0 +1,16 @@
package auth
import (
"crypto/rand"
"encoding/base64"
"fmt"
)
// NewRandomID returns a URL-safe high-entropy identifier.
func NewRandomID() (string, error) {
buffer := make([]byte, 16)
if _, err := rand.Read(buffer); err != nil {
return "", fmt.Errorf("random id: %w", err)
}
return base64.RawURLEncoding.EncodeToString(buffer), nil
}