Auth: Add IsClientEnabled and IsEnabled for the authn.Service and authn.Client interfaces (#86034)

* Add `Service. IsClientEnabled` and `Client.IsEnabled` functions

* Implement `IsEnabled` function for authn clients

* Implement `IsClientEnabled` function for authn services
This commit is contained in:
linoman
2024-04-15 02:54:50 -06:00
committed by GitHub
parent 2b62167842
commit 51da96d94e
19 changed files with 140 additions and 5 deletions

View File

@@ -20,6 +20,7 @@ import (
"github.com/grafana/grafana/pkg/plugins/pluginscdn"
accesscontrolmock "github.com/grafana/grafana/pkg/services/accesscontrol/mock"
"github.com/grafana/grafana/pkg/services/apiserver/endpoints/request"
"github.com/grafana/grafana/pkg/services/authn/authntest"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/services/licensing"
"github.com/grafana/grafana/pkg/services/pluginsintegration/pluginsettings"
@@ -58,9 +59,10 @@ func setupTestEnvironment(t *testing.T, cfg *setting.Cfg, features featuremgmt.F
}
hs := &HTTPServer{
Cfg: cfg,
Features: features,
License: &licensing.OSSLicensingService{Cfg: cfg},
authnService: &authntest.FakeService{},
Cfg: cfg,
Features: features,
License: &licensing.OSSLicensingService{Cfg: cfg},
RenderService: &rendering.RenderingService{
Cfg: cfg,
RendererPluginManager: &fakeRendererPluginManager{},