AuthN: Readd user protection service to user sync (#61534)

* add user protection service to user sync

* fix tests
This commit is contained in:
Jo
2023-01-16 11:15:14 +00:00
committed by GitHub
parent dcfeab2c73
commit be3b81fecd
3 changed files with 31 additions and 24 deletions
+2 -1
View File
@@ -40,6 +40,7 @@ func ProvideService(
accessControlService accesscontrol.Service,
apikeyService apikey.Service, userService user.Service,
jwtService auth.JWTVerifierService,
userProtectionService login.UserProtectionService,
loginAttempts loginattempt.Service, quotaService quota.Service,
authInfoService login.AuthInfoService, renderService rendering.Service,
) *Service {
@@ -83,7 +84,7 @@ func ProvideService(
}
// FIXME (jguer): move to User package
userSyncService := sync.ProvideUserSync(userService, authInfoService, quotaService)
userSyncService := sync.ProvideUserSync(userService, userProtectionService, authInfoService, quotaService)
orgUserSyncService := sync.ProvideOrgSync(userService, orgService, accessControlService)
s.RegisterPostAuthHook(userSyncService.SyncUser)
s.RegisterPostAuthHook(orgUserSyncService.SyncOrgUser)