refactor: migrate SCIM sync to actor + add tests (#1680)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
Alessandro (Ale) Segala
2026-08-18 21:54:06 +02:00
committed by GitHub
co-authored by copilot-swe-agent[bot]
parent a099d9457c
commit 8c095afd78
33 changed files with 1919 additions and 782 deletions
+6
View File
@@ -36,6 +36,11 @@ type GroupSyncer interface {
UpdateUsersInternal(ctx context.Context, id string, userIDs []string, tx *gorm.DB) (model.UserGroup, error)
}
// ScimSyncScheduler schedules SCIM after the LDAP transaction has committed
type ScimSyncScheduler interface {
ScheduleSync(ctx context.Context)
}
type Dependencies struct {
DB *gorm.DB
Actors *local.Host
@@ -45,6 +50,7 @@ type Dependencies struct {
Users UserSyncer
Groups GroupSyncer
AppConfig appconfig.AppConfigResolver
ScimSync ScimSyncScheduler
// ScheduleDisabled keeps the recurring sync from being armed
// It's set in the test environment, where syncs are driven explicitly by the end-to-end tests