mirror of
https://github.com/h44z/wg-portal.git
synced 2026-11-20 20:53:40 +01:00
feat(auth): require changing default admin password (#778)
This commit is contained in:
@@ -27,7 +27,10 @@ func (e TestEndpoint) GetName() string {
|
||||
|
||||
func (e TestEndpoint) RegisterRoutes(g *routegroup.Bundle) {
|
||||
g.HandleFunc("GET /now", e.handleCurrentTimeGet())
|
||||
g.With(e.authenticator.LoggedIn(ScopeAdmin)).HandleFunc("GET /hostname", e.handleHostnameGet())
|
||||
g.With(
|
||||
e.authenticator.LoggedIn(ScopeAdmin),
|
||||
e.authenticator.RequireNonDefaultPassword(),
|
||||
).HandleFunc("GET /hostname", e.handleHostnameGet())
|
||||
}
|
||||
|
||||
// handleCurrentTimeGet represents the GET endpoint that responds the current time
|
||||
|
||||
Reference in New Issue
Block a user