MSP-5052 remove ldap

This commit is contained in:
yakovlevav committed 2025-07-25 10:35:06 +03:00
1 parent 558682da1e
commit 4f67872d3f
16 files changed
+8 -417

No files matched your search

-11
View File
@@ -51,10 +51,6 @@ type roleRepoUser interface {
GetRoleByIds(ctx context.Context, id []int) ([]entity.Role, error)
}
type LdapService interface {
SyncGroupsAsync(ctx context.Context, user entity.User)
}
type User struct {
userRepo UserRepo
userRoleRepo UserRoleRepo
@@ -62,7 +58,6 @@ type User struct {
tokenRepo TokenRepo
auditService auditService
txRunner UserTransactionRunner
ldapService LdapService
tokenService tokenService
idleTimeoutMs int
logger log.Logger
@@ -75,7 +70,6 @@ func NewUser(
tokenRepo TokenRepo,
service auditService,
txRunner UserTransactionRunner,
ldapService LdapService,
tokenService tokenService,
idleTimeoutMs int,
logger log.Logger,
@@ -87,7 +81,6 @@ func NewUser(
tokenRepo: tokenRepo,
auditService: service,
txRunner: txRunner,
ldapService: ldapService,
tokenService: tokenService,
idleTimeoutMs: idleTimeoutMs,
logger: logger,
@@ -218,8 +211,6 @@ func (u User) CreateUser(ctx context.Context, req domain.CreateUserRequest, admi
return nil, errors.WithMessage(err, "create user transaction")
}
u.ldapService.SyncGroupsAsync(ctx, usr)
slices.Sort(req.Roles)
diff := diffToString(map[string]any{
"Имя": "",
@@ -299,8 +290,6 @@ func (u User) UpdateUser(ctx context.Context, req domain.UpdateUserRequest, admi
return nil, errors.WithMessage(err, "update user transaction")
}
u.ldapService.SyncGroupsAsync(ctx, *user)
slices.Sort(req.Roles)
diff := diffToString(map[string]any{
"Имя": user.FirstName,