mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-10-27 11:09:04 +01:00
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:
co-authored by
copilot-swe-agent[bot]
parent
a099d9457c
commit
8c095afd78
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user