mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-04 06:36:27 +08:00
Add validation for uid uniqness [GIOT-29]
This commit is contained in:
parent
91233a97c4
commit
fc0e2d2172
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