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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-02-23 22:32:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-23 22:32:01 +0300
commita9d8078fd8eae9d32ac463d1e0d1d08c19b579ce (patch)
treecb3f6846f03f6f8f8d0426410b920edd706f6f53 /app/models
parent711f0b7720142761f632a87e6f3e9eb24c3aed27 (diff)
Add latest changes from gitlab-org/gitlab@15-9-stable-ee
Diffstat (limited to 'app/models')
-rw-r--r--app/models/user_synced_attributes_metadata.rb14
1 files changed, 5 insertions, 9 deletions
diff --git a/app/models/user_synced_attributes_metadata.rb b/app/models/user_synced_attributes_metadata.rb
index 4cceffda19e..4cd0e3fb828 100644
--- a/app/models/user_synced_attributes_metadata.rb
+++ b/app/models/user_synced_attributes_metadata.rb
@@ -27,15 +27,11 @@ class UserSyncedAttributesMetadata < ApplicationRecord
class << self
def syncable_attributes
- return SYNCABLE_ATTRIBUTES if sync_name?
-
- SYNCABLE_ATTRIBUTES - %i[name]
- end
-
- private
-
- def sync_name?
- Gitlab.config.ldap.sync_name
+ if Gitlab.config.ldap.enabled && !Gitlab.config.ldap.sync_name
+ SYNCABLE_ATTRIBUTES - %i[name]
+ else
+ SYNCABLE_ATTRIBUTES
+ end
end
end