diff options
Diffstat (limited to 'app/models/identity.rb')
-rw-r--r-- | app/models/identity.rb | 7 |
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 |