mirror of
https://github.com/grafana/grafana.git
synced 2024-11-22 00:47:38 -06:00
Fix access control service init (#32492)
* Fix access control service init * Chore: use assert from testify package
This commit is contained in:
parent
270a255c08
commit
784425c2ee
@ -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"
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user