mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 06:56:54 +08:00
Merge pull request #785 from okriuchykhin/ok_GIOT_29
Add validation for uid uniqness [GIOT-29]
This commit is contained in:
commit
c44c5b37bb
1 changed files with 1 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
class UserIdentity < ActiveRecord::Base
|
class UserIdentity < ActiveRecord::Base
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
validates :provider, uniqueness: { scope: :user_id }
|
validates :provider, uniqueness: { scope: :user_id }
|
||||||
|
validates :uid, uniqueness: { scope: :provider }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue