fix: users can't be updated by admin if self account editing is disabled

This commit is contained in:
Elias Schneider
2025-06-27 17:14:53 +02:00
parent 6db57d9f27
commit 29cb5513a0

View File

@@ -297,7 +297,7 @@ func (s *UserService) updateUserInternal(ctx context.Context, userID string, upd
allowOwnAccountEdit := s.appConfigService.GetDbConfig().AllowOwnAccountEdit.IsTrue()
// For LDAP users or if own account editing is not allowed, only allow updating the locale unless it's an LDAP sync
if !isLdapSync && (isLdapUser || (!allowOwnAccountEdit && !updateOwnUser)) {
if !isLdapSync && (isLdapUser || (!allowOwnAccountEdit && updateOwnUser)) {
user.Locale = updatedUser.Locale
} else {
user.FirstName = updatedUser.FirstName