diff options
Diffstat (limited to 'app/services/users/update_service.rb')
-rw-r--r-- | app/services/users/update_service.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/services/users/update_service.rb b/app/services/users/update_service.rb index e7667b0ca18..57209043e3b 100644 --- a/app/services/users/update_service.rb +++ b/app/services/users/update_service.rb @@ -53,7 +53,11 @@ module Users end def discard_read_only_attributes - discard_synced_attributes + if Feature.enabled?(:ldap_readonly_attributes, default_enabled: true) + params.reject! { |key, _| @user.read_only_attribute?(key.to_sym) } + else + discard_synced_attributes + end end def discard_synced_attributes |