SciMesh
+Sign out
+End the current session so you can sign in with a different account (for example the cluster administrator).
+ +Changed your mind? Back to sign in
+diff --git a/coordinator/internal/transport/http/server.go b/coordinator/internal/transport/http/server.go index 2f2d51e..1bc6e95 100644 --- a/coordinator/internal/transport/http/server.go +++ b/coordinator/internal/transport/http/server.go @@ -158,6 +158,7 @@ func (s *Server) Handler(token string, uiToken ...string) http.Handler { // Public auth pages — reachable without a session so a user can log in. ui.HandleFunc("GET /ui/login", s.handleUILoginForm) ui.HandleFunc("POST /ui/login", s.handleUILogin) + ui.HandleFunc("GET /ui/logout-form", s.handleUILogoutForm) ui.HandleFunc("GET /ui/register", s.handleUIRegisterForm) ui.HandleFunc("POST /ui/register", s.handleUIRegister) ui.HandleFunc("POST /ui/logout", s.handleUILogout) diff --git a/coordinator/internal/transport/http/templates/login.html b/coordinator/internal/transport/http/templates/login.html index 8e7d22f..e3dd549 100644 --- a/coordinator/internal/transport/http/templates/login.html +++ b/coordinator/internal/transport/http/templates/login.html @@ -20,7 +20,10 @@ - {{if .Error}}
{{.Error}}
{{end}} + {{if eq .Error "admin role required"}} +The admin console is reserved for the cluster administrator.
+You are signed in as a non-admin. Log out, then sign in with the admin account — its login is printed by coordinator serve on first start and stored in ~/.scimesh/admin.password.
{{.Error}}
{{end}}No account? Register
+SciMesh
+End the current session so you can sign in with a different account (for example the cluster administrator).
+ +Changed your mind? Back to sign in
+diff --git a/coordinator/internal/transport/http/templates/logout-form.html b/coordinator/internal/transport/http/templates/logout-form.html new file mode 100644 index 0000000..49e81fc --- /dev/null +++ b/coordinator/internal/transport/http/templates/logout-form.html @@ -0,0 +1,24 @@ +{{define "logout-form.html"}} + + +
+ + +
+ + +
+