Git: Update experimental workflow POC (#60049)
This commit is contained in:
+4
-1
@@ -114,8 +114,11 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
r.Get("/admin/orgs", authorizeInOrg(reqGrafanaAdmin, ac.UseGlobalOrg, ac.OrgsAccessEvaluator), hs.Index)
|
||||
r.Get("/admin/orgs/edit/:id", authorizeInOrg(reqGrafanaAdmin, ac.UseGlobalOrg, ac.OrgsAccessEvaluator), hs.Index)
|
||||
r.Get("/admin/stats", authorize(reqGrafanaAdmin, ac.EvalPermission(ac.ActionServerStatsRead)), hs.Index)
|
||||
r.Get("/admin/storage/*", reqGrafanaAdmin, hs.Index)
|
||||
r.Get("/admin/ldap", authorize(reqGrafanaAdmin, ac.EvalPermission(ac.ActionLDAPStatusRead)), hs.Index)
|
||||
if hs.Features.IsEnabled(featuremgmt.FlagStorage) {
|
||||
r.Get("/admin/storage", reqSignedIn, hs.Index)
|
||||
r.Get("/admin/storage/*", reqSignedIn, hs.Index)
|
||||
}
|
||||
r.Get("/styleguide", reqSignedIn, hs.Index)
|
||||
|
||||
r.Get("/live", reqGrafanaAdmin, hs.Index)
|
||||
|
||||
@@ -245,6 +245,8 @@ func ApplyAdminIA(root *NavTreeRoot) {
|
||||
adminNodeLinks = append(adminNodeLinks, accessNode)
|
||||
}
|
||||
|
||||
adminNodeLinks = AppendIfNotNil(adminNodeLinks, root.FindById("storage"))
|
||||
|
||||
if len(adminNodeLinks) > 0 {
|
||||
orgAdminNode.Children = adminNodeLinks
|
||||
} else {
|
||||
|
||||
@@ -592,8 +592,7 @@ func (s *standardStorageService) getWorkflowOptions(ctx context.Context, user *u
|
||||
Workflows: make([]workflowInfo, 0),
|
||||
}
|
||||
|
||||
scope, _ := splitFirstSegment(path)
|
||||
root, _ := s.tree.getRoot(user.OrgID, scope)
|
||||
root, _ := s.tree.getRoot(user.OrgID, path)
|
||||
if root == nil {
|
||||
return options, fmt.Errorf("can not read")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user