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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user