summaryrefslogtreecommitdiff
path: root/app/models/identity.rb
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2014-11-25 18:15:30 +0200
committerValery Sizov <vsv2711@gmail.com>2014-12-04 13:01:50 +0200
commit1a80d13a3990937580c97e2b0ba8fb98f69bc055 (patch)
treed073b436e6585b0d025163f10e5762578fcbc169 /app/models/identity.rb
parent236741008ed82b77e3e4357e07060f7764d1d21a (diff)
downloadgitlab-ce-1a80d13a3990937580c97e2b0ba8fb98f69bc055.tar.gz
Multi-provider auth. LDAP is not reworked
Diffstat (limited to 'app/models/identity.rb')
-rw-r--r--app/models/identity.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/identity.rb b/app/models/identity.rb
new file mode 100644
index 00000000000..e6af93bcc50
--- /dev/null
+++ b/app/models/identity.rb
@@ -0,0 +1,7 @@
+class Identity < ActiveRecord::Base
+ belongs_to :user
+
+ validates :extern_uid, allow_blank: true, uniqueness: {scope: :provider}
+
+ scope :ldap, -> { where('provider LIKE ?', 'ldap%') }
+end \ No newline at end of file