Auth: Change UI route, add frontend endpoints to api.go (#80671)

Delete advanced from UI route, fix 404
This commit is contained in:
Misi
2024-01-19 11:53:37 +01:00
committed by GitHub
parent 4d6069583e
commit 6752a512f3
2 changed files with 6 additions and 2 deletions

View File

@@ -107,7 +107,6 @@ func (hs *HTTPServer) registerRoutes() {
r.Get("/admin/orgs", authorizeInOrg(ac.UseGlobalOrg, ac.OrgsAccessEvaluator), hs.Index)
r.Get("/admin/orgs/edit/:id", authorizeInOrg(ac.UseGlobalOrg, ac.OrgsAccessEvaluator), hs.Index)
r.Get("/admin/stats", authorize(ac.EvalPermission(ac.ActionServerStatsRead)), hs.Index)
r.Get("/admin/authentication/ldap", authorize(ac.EvalPermission(ac.ActionLDAPStatusRead)), hs.Index)
if hs.Features.IsEnabledGlobally(featuremgmt.FlagStorage) {
r.Get("/admin/storage", reqSignedIn, hs.Index)
r.Get("/admin/storage/*", reqSignedIn, hs.Index)
@@ -223,6 +222,11 @@ func (hs *HTTPServer) registerRoutes() {
}
r.Get("/admin/authentication/", authorize(evalAuthenticationSettings()), hs.Index)
r.Get("/admin/authentication/ldap", authorize(ac.EvalPermission(ac.ActionLDAPStatusRead)), hs.Index)
if hs.Features.IsEnabledGlobally(featuremgmt.FlagSsoSettingsApi) {
providerParam := ac.Parameter("provider")
r.Get("/admin/authentication/:provider", authorize(ac.EvalPermission(ac.ActionSettingsRead, ac.ScopeSettingsOAuth(providerParam))), hs.Index)
}
// authed api
r.Group("/api", func(apiRoute routing.RouteRegister) {