fix: remove migrated, and /org endpoint (#44788)

* fix: remove migrated, and /org endpoint

* Update pkg/api/index.go
This commit is contained in:
Eric Leijonmarck
2022-02-02 16:32:37 +01:00
committed by GitHub
parent 9e6b9215ab
commit 1dd2579528
8 changed files with 10 additions and 21 deletions
+2 -3
View File
@@ -144,9 +144,8 @@ func (hs *HTTPServer) getAppLinks(c *models.ReqContext) ([]*dtos.NavLink, error)
}
func enableServiceAccount(hs *HTTPServer, c *models.ReqContext) bool {
return c.OrgRole == models.ROLE_ADMIN &&
hs.Features.IsEnabled(featuremgmt.FlagServiceAccounts) &&
hs.serviceAccountsService.Migrated(c.Req.Context(), c.OrgId)
return (c.OrgRole == models.ROLE_ADMIN || (hs.Cfg.EditorsCanAdmin && c.OrgRole == models.ROLE_EDITOR)) &&
hs.Features.IsEnabled(featuremgmt.FlagServiceAccounts)
}
func enableTeams(hs *HTTPServer, c *models.ReqContext) bool {