Routing: Update routing to require sign in on every route (#19118)

* Update routing to require sign in on every route

* Review update
This commit is contained in:
Dominik Prokop 2019-09-16 14:06:50 +02:00 committed by GitHub
parent a28aefa370
commit 97ff75732d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,6 @@ func (hs *HTTPServer) registerRoutes() {
r := hs.RouteRegister
// not logged in views
r.Get("/", reqSignedIn, hs.Index)
r.Get("/logout", hs.Logout)
r.Post("/login", quota("session"), bind(dtos.LoginCommand{}), Wrap(hs.LoginPost))
r.Get("/login/:name", quota("session"), hs.OAuthLogin)
@ -422,4 +421,6 @@ func (hs *HTTPServer) registerRoutes() {
r.Get("/api/snapshots/:key", GetDashboardSnapshot)
r.Get("/api/snapshots-delete/:deleteKey", reqSnapshotPublicModeOrSignedIn, Wrap(DeleteDashboardSnapshotByDeleteKey))
r.Delete("/api/snapshots/:key", reqEditorRole, Wrap(DeleteDashboardSnapshot))
r.Get("/*", reqSignedIn, hs.Index)
}