Skip to content

Commit

Permalink
fix peer disable if ldap user is disabled (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
h44z committed Jan 17, 2025
1 parent 7ccec5d commit 6523a87
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions internal/app/users/user_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,13 @@ func (m Manager) disableMissingLdapUsers(
continue
}

now := time.Now()
user.Disabled = &now
user.DisabledReason = domain.DisabledReasonLdapMissing

err := m.users.SaveUser(ctx, user.Identifier, func(u *domain.User) (*domain.User, error) {
now := time.Now()
u.Disabled = &now
u.DisabledReason = "missing in ldap"
u.Disabled = user.Disabled
u.DisabledReason = user.DisabledReason
return u, nil
})
if err != nil {
Expand Down

0 comments on commit 6523a87

Please sign in to comment.