Chore: Remove use of deprecated method in AC code (#87541)

* switch from using cfg to using featuremgmt for checking a feature toggle in AC code

* merge test fixes
This commit is contained in:
Ieva
2024-05-10 11:56:52 +01:00
committed by GitHub
parent 8c7b8542f1
commit 167151b211
39 changed files with 107 additions and 111 deletions

View File

@ -35,6 +35,7 @@ import (
"github.com/grafana/grafana/pkg/services/authn"
"github.com/grafana/grafana/pkg/services/authn/authntest"
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/services/org"
"github.com/grafana/grafana/pkg/services/org/orgtest"
"github.com/grafana/grafana/pkg/services/pluginsintegration/pluginaccesscontrol"
@ -745,7 +746,7 @@ func TestHTTPServer_hasPluginRequestedPermissions(t *testing.T) {
}
hs.log = logger
hs.accesscontrolService = actest.FakeService{}
hs.AccessControl = acimpl.ProvideAccessControl(hs.Cfg)
hs.AccessControl = acimpl.ProvideAccessControl(featuremgmt.WithFeatures())
expectedIdentity := &authn.Identity{
OrgID: tt.orgID,