Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/users/update_service.rb')
-rw-r--r--app/services/users/update_service.rb6
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