Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions app/controlplane/pkg/biz/useraccess_syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,18 @@ func (u *UserAccessSyncerUseCase) StartSyncingUserAccess(ctx context.Context) er
ticker := time.NewTicker(10 * time.Second)
defer ticker.Stop()

u.logger.Infow("msg", "syncing user access")

for {
select {
case <-ctx.Done():
u.logger.Infow("msg", "stopping user access sync")
return nil
case <-ticker.C:
u.logger.Infow("msg", "Syncing user access")

// Update the access restriction status of all users based on the allowlist
if err := u.updateUserAccessBasedOnAllowList(ctx); err != nil {
return fmt.Errorf("update user access based on allow list: %w", err)
}

u.logger.Infow("msg", "User access synced")
}
}
}
Expand Down
Loading