diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-23 11:21:23 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-23 11:21:23 +0200 |
commit | 21e227d8709aacd9e00265225f6fa08768c084b8 (patch) | |
tree | 8c99540c9ff012cc438c16dd16ce9d1c5c16b892 /app/models | |
parent | 615257b91c250da4dd28ed12e5b7a858115c75d4 (diff) | |
download | gitlab-ce-21e227d8709aacd9e00265225f6fa08768c084b8.tar.gz |
Validate presence of provider field in Identityidentity-validation
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/identity.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/identity.rb b/app/models/identity.rb index 756d19adec7..ad60154be71 100644 --- a/app/models/identity.rb +++ b/app/models/identity.rb @@ -14,6 +14,7 @@ class Identity < ActiveRecord::Base include Sortable belongs_to :user + validates :provider, presence: true validates :extern_uid, allow_blank: true, uniqueness: { scope: :provider } validates :user_id, uniqueness: { scope: :provider } end |