From fc0e2d217203072d67c9d78c2b783f1d83082dd2 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Fri, 1 Sep 2017 17:00:13 +0200 Subject: [PATCH] Add validation for uid uniqness [GIOT-29] --- app/models/user_identity.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/user_identity.rb b/app/models/user_identity.rb index c5a7c08f6..e0ae551e4 100644 --- a/app/models/user_identity.rb +++ b/app/models/user_identity.rb @@ -1,4 +1,5 @@ class UserIdentity < ActiveRecord::Base belongs_to :user validates :provider, uniqueness: { scope: :user_id } + validates :uid, uniqueness: { scope: :provider } end