Service accounts: Grafana service accounts are enabled by default (#51402)

* Remove feature flag for service accounts

* Fix failing tests and remove remaining usage

* Fix failing tests and remove remaining usage
This commit is contained in:
Vardan Torosyan
2022-06-27 10:22:49 +02:00
committed by GitHub
parent 1399ab50b3
commit f1661166b2
9 changed files with 13 additions and 71 deletions
-4
View File
@@ -151,9 +151,6 @@ func (hs *HTTPServer) getAppLinks(c *models.ReqContext) ([]*dtos.NavLink, error)
}
func enableServiceAccount(hs *HTTPServer, c *models.ReqContext) bool {
if !hs.Features.IsEnabled(featuremgmt.FlagServiceAccounts) {
return false
}
hasAccess := ac.HasAccess(hs.AccessControl, c)
return hasAccess(ac.ReqOrgAdmin, serviceAccountAccessEvaluator)
}
@@ -298,7 +295,6 @@ func (hs *HTTPServer) getNavTree(c *models.ReqContext, hasEditPerm bool, prefs *
Url: hs.Cfg.AppSubURL + "/org/apikeys",
})
}
// needs both feature flag and migration to be able to show service accounts
if enableServiceAccount(hs, c) {
configNodes = append(configNodes, &dtos.NavLink{
Text: "Service accounts",