Skip to content

Commit

Permalink
Restore uniqueness validators
Browse files Browse the repository at this point in the history
MSP-10963

Since last commit proves validator changes are needed, restore the
changes to prove the specs catch the error.
  • Loading branch information
limhoff-r7 committed Aug 2, 2014
1 parent 357c9e8 commit fbca755
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/models/metasploit/credential/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ class Metasploit::Credential::Core < ActiveRecord::Base
scope: [
:workspace_id,
# realm_id and public_id need to be included in scope so validator uses IS NULL.
#:realm_id,
#:public_id
:realm_id,
:public_id
]
},
if: '!realm.present? && !public.present? && private.present?'
Expand All @@ -132,8 +132,8 @@ class Metasploit::Credential::Core < ActiveRecord::Base
scope: [
:workspace_id,
# realm_id and private_id need ot be included in scope so validator uses IS NULL.
#:realm_id,
#:private_id
:realm_id,
:private_id
]
},
if: '!realm.present? && public.present? && !private.present?'
Expand All @@ -144,7 +144,7 @@ class Metasploit::Credential::Core < ActiveRecord::Base
scope: [
:workspace_id,
# realm_id needs to be included in scope so validator uses IS NULL.
#:realm_id,
:realm_id,
:public_id
]
},
Expand All @@ -157,7 +157,7 @@ class Metasploit::Credential::Core < ActiveRecord::Base
:workspace_id,
:realm_id,
# public_id needs to be included in scope so validator uses IS NULL.
#:public_id
:public_id
]
},
if: 'realm.present? && !public.present? && private.present?'
Expand All @@ -169,7 +169,7 @@ class Metasploit::Credential::Core < ActiveRecord::Base
:workspace_id,
:realm_id,
# private_id needs to be included in scope so validator uses IS NULL.
#:private_id
:private_id
]
},
if: 'realm.present? && public.present? && !private.present?'
Expand Down

0 comments on commit fbca755

Please sign in to comment.