[v9.4.x] LDAP: Fix user disabling (#74318)

* [LDAP] Disable removed users on login (#74016)

* manual backport of #74016 on legacy code

* LDAP: Fix active sync with large quantities of users (#73834)

* Fix authenticate user test
This commit is contained in:
Gabriel MABILLE
2023-09-04 16:14:20 +02:00
committed by GitHub
parent 1e00f2e0ab
commit 49d3cf745f
12 changed files with 187 additions and 56 deletions
+5
View File
@@ -17,6 +17,7 @@ type FakeUserService struct {
GetSignedInUserFn func(ctx context.Context, query *user.GetSignedInUserQuery) (*user.SignedInUser, error)
CreateFn func(ctx context.Context, cmd *user.CreateUserCommand) (*user.User, error)
DisableFn func(ctx context.Context, cmd *user.DisableUserCommand) error
counter int
}
@@ -92,6 +93,10 @@ func (f *FakeUserService) Search(ctx context.Context, query *user.SearchUsersQue
}
func (f *FakeUserService) Disable(ctx context.Context, cmd *user.DisableUserCommand) error {
if f.DisableFn != nil {
return f.DisableFn(ctx, cmd)
}
return f.ExpectedError
}