diff --git a/pkg/server/server.go b/pkg/server/server.go index 7135dbc406d..edc6751ab2e 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -31,6 +31,7 @@ import ( "github.com/grafana/grafana/pkg/middleware" _ "github.com/grafana/grafana/pkg/plugins/manager" "github.com/grafana/grafana/pkg/registry" + _ "github.com/grafana/grafana/pkg/services/accesscontrol/manager" _ "github.com/grafana/grafana/pkg/services/alerting" _ "github.com/grafana/grafana/pkg/services/auth" _ "github.com/grafana/grafana/pkg/services/cleanup" diff --git a/pkg/services/accesscontrol/manager/manager.go b/pkg/services/accesscontrol/manager/manager.go index b8bdf224e44..f5a9fab640b 100644 --- a/pkg/services/accesscontrol/manager/manager.go +++ b/pkg/services/accesscontrol/manager/manager.go @@ -40,6 +40,10 @@ func (m *Manager) Init() error { } func (m *Manager) IsDisabled() bool { + if m.Cfg == nil { + return true + } + _, exists := m.Cfg.FeatureToggles["accesscontrol"] return !exists }