summaryrefslogtreecommitdiff
path: root/app/models/identity.rb
diff options
context:
space:
mode:
authorGabriel Mazetto <gabriel@gitlab.com>2016-01-06 05:38:52 -0200
committerGabriel Mazetto <gabriel@gitlab.com>2016-01-08 16:26:04 -0200
commitec67e9be1d7486199b47e19c766202a8bfdefe93 (patch)
tree2499ddcd631bb0935b77d510a6a137ba4b2b1ac4 /app/models/identity.rb
parentd6dc088affeee4568e771e1d7894e0bcdb955af8 (diff)
downloadgitlab-ce-ec67e9be1d7486199b47e19c766202a8bfdefe93.tar.gz
Repair ldap_blocked state when no ldap identity exist anymore
Diffstat (limited to 'app/models/identity.rb')
-rw-r--r--app/models/identity.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/identity.rb b/app/models/identity.rb
index 8bcdc194953..830b99fa3f2 100644
--- a/app/models/identity.rb
+++ b/app/models/identity.rb
@@ -18,4 +18,8 @@ class Identity < ActiveRecord::Base
validates :provider, presence: true
validates :extern_uid, allow_blank: true, uniqueness: { scope: :provider }
validates :user_id, uniqueness: { scope: :provider }
+
+ def is_ldap?
+ provider.starts_with?('ldap')
+ end
end