summaryrefslogtreecommitdiff
path: root/app/models/identity.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-12-13 18:02:49 +0100
committerDouwe Maan <douwe@selenight.nl>2017-12-14 15:46:54 +0100
commit997acb6dfc7e2134ffda2717f72e6ab02eb001dd (patch)
tree762edcc2cd834bdfe3af98277ba8a5481d1cb7e9 /app/models/identity.rb
parentd673628de003d1ce1402f03311066339828fb811 (diff)
downloadgitlab-ce-dm-ldap-email-readonly.tar.gz
Make sure user email is read only went synced with LDAPdm-ldap-email-readonly
Diffstat (limited to 'app/models/identity.rb')
-rw-r--r--app/models/identity.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/identity.rb b/app/models/identity.rb
index ff811e19f8a..99d99bc6deb 100644
--- a/app/models/identity.rb
+++ b/app/models/identity.rb
@@ -14,11 +14,11 @@ class Identity < ActiveRecord::Base
end
def ldap?
- provider.starts_with?('ldap')
+ Gitlab::OAuth::Provider.ldap_provider?(provider)
end
def self.normalize_uid(provider, uid)
- if provider.to_s.starts_with?('ldap')
+ if Gitlab::OAuth::Provider.ldap_provider?(provider)
Gitlab::LDAP::Person.normalize_dn(uid)
else
uid.to_s