diff --git a/pkg/api/folder_test.go b/pkg/api/folder_test.go index 914acf5797e..d5e4ee418cd 100644 --- a/pkg/api/folder_test.go +++ b/pkg/api/folder_test.go @@ -143,7 +143,7 @@ func createFolderScenario(desc string, url string, routePattern string, mock *fa defer bus.ClearBusHandlers() cfg := setting.NewCfg() - cfg.EditorsCanOwn = false + cfg.EditorsCanOwn = true hs := HTTPServer{ Bus: bus.GetBus(), diff --git a/pkg/api/index.go b/pkg/api/index.go index 904a885b171..88c4b7e929d 100644 --- a/pkg/api/index.go +++ b/pkg/api/index.go @@ -327,6 +327,34 @@ func (hs *HTTPServer) setIndexViewData(c *m.ReqContext) (*dtos.IndexViewData, er }) } + if c.OrgRole == m.ROLE_EDITOR && hs.Cfg.EditorsCanOwn { + cfgNode := &dtos.NavLink{ + Id: "cfg", + Text: "Configuration", + SubTitle: "Organization: " + c.OrgName, + Icon: "gicon gicon-cog", + Url: setting.AppSubUrl + "/org/teams", + Children: []*dtos.NavLink{ + { + Text: "Teams", + Id: "teams", + Description: "Manage org groups", + Icon: "gicon gicon-team", + Url: setting.AppSubUrl + "/org/teams", + }, + { + Text: "Plugins", + Id: "plugins", + Description: "View and configure plugins", + Icon: "gicon gicon-plugins", + Url: setting.AppSubUrl + "/plugins", + }, + }, + } + + data.NavTree = append(data.NavTree, cfgNode) + } + data.NavTree = append(data.NavTree, &dtos.NavLink{ Text: "Help", SubTitle: fmt.Sprintf(`%s v%s (%s)`, setting.ApplicationName, setting.BuildVersion, setting.BuildCommit),