diff options
author | Gabriel Mazetto <gabriel@gitlab.com> | 2016-01-06 05:38:52 -0200 |
---|---|---|
committer | Gabriel Mazetto <gabriel@gitlab.com> | 2016-01-08 16:26:04 -0200 |
commit | ec67e9be1d7486199b47e19c766202a8bfdefe93 (patch) | |
tree | 2499ddcd631bb0935b77d510a6a137ba4b2b1ac4 /app/models/identity.rb | |
parent | d6dc088affeee4568e771e1d7894e0bcdb955af8 (diff) | |
download | gitlab-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.rb | 4 |
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 |