fix: use policy engine in oauth whitelist check (#904)

This commit is contained in:
Stavros
2026-05-26 00:07:46 +03:00
committed by GitHub
parent c3461131f5
commit 0a3e7bf265
7 changed files with 48 additions and 20 deletions
+4 -1
View File
@@ -414,8 +414,11 @@ func TestUserController(t *testing.T) {
ctx := context.TODO()
wg := &sync.WaitGroup{}
policyEngine, err := service.NewPolicyEngine(cfg, log)
require.NoError(t, err)
broker := service.NewOAuthBrokerService(log, map[string]model.OAuthServiceConfig{}, ctx)
authService := service.NewAuthService(log, cfg, runtime, ctx, wg, nil, store, broker, nil)
authService := service.NewAuthService(log, cfg, runtime, ctx, wg, nil, store, broker, nil, policyEngine)
beforeEach := func() {
// Clear failed login attempts before each test