summaryrefslogtreecommitdiff
path: root/app/services/users
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-04 15:08:40 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-04 15:08:40 +0000
commit6b833f1e0340e00fdee074da9c42c0d4e07a46d2 (patch)
tree6fc3a7a2f8a02fec8d1e7561b453d33eb4048dad /app/services/users
parent88a0824944720b6edaaef56376713541b9a02118 (diff)
downloadgitlab-ce-6b833f1e0340e00fdee074da9c42c0d4e07a46d2.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/users')
-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