diff --git a/app/models/ability.rb b/app/models/ability.rb index 8e98748c4..0fcd87d6b 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -89,7 +89,7 @@ class Ability # Registrar/api_user dynamic role def billing can :view, :registrar_dashboard - can :manage, Invoice + can(:manage, Invoice) { |i| i.buyer_id == @user.registrar_id } can :manage, :deposit can :read, AccountActivity end diff --git a/spec/epp/contact_spec.rb b/spec/epp/contact_spec.rb index 4eab8dac1..35ad4558f 100644 --- a/spec/epp/contact_spec.rb +++ b/spec/epp/contact_spec.rb @@ -522,7 +522,7 @@ describe 'EPP Contact', epp: true do authInfo: { pw: { value: 'newpassword' } } } }) - puts Nokogiri xml + response = epp_plain_request(xml, :xml) response[:results][0][:msg].should == 'Command completed successfully' response[:results][0][:result_code].should == '1000'