AccessControl: Replace IsEnterprise checks with license checks (#49572) (#49646)

(cherry picked from commit 5caf97be40)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2022-05-25 20:59:47 +02:00
committed by GitHub
co-authored by Karl Persson
parent 1d4e2d12da
commit 4bd6f62dfd
11 changed files with 98 additions and 25 deletions
@@ -118,7 +118,7 @@ func (a *api) getPermissions(c *models.ReqContext) response.Response {
return response.Error(http.StatusInternalServerError, "failed to get permissions", err)
}
if a.service.options.Assignments.BuiltInRoles && !a.service.cfg.IsEnterprise {
if a.service.options.Assignments.BuiltInRoles && !a.service.license.FeatureEnabled("accesscontrol.enforcement") {
permissions = append(permissions, accesscontrol.ResourcePermission{
Actions: a.service.actions,
Scope: "*",