proper uniqueness validation in auth model
This commit is contained in:
parent
63902fd273
commit
3a5f0c9678
1 changed files with 1 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
class OAuth2::Provider::Models::ActiveRecord::Authorization
|
||||
validates_presence_of :resource_owner_id, :resource_owner_type
|
||||
validates_uniqueness_of :resource_owner_id, :scope => [:client_id, :resource_owner_type]
|
||||
validates_uniqueness_of :client_id, :scope => :resource_owner_id
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue