mirror of
https://github.com/internetee/registry.git
synced 2025-08-12 04:29:33 +02:00
Allow registrar to see only its own invoices #2819
This commit is contained in:
parent
1db36ad16a
commit
a551d1b4e0
2 changed files with 2 additions and 2 deletions
|
@ -89,7 +89,7 @@ class Ability
|
||||||
# Registrar/api_user dynamic role
|
# Registrar/api_user dynamic role
|
||||||
def billing
|
def billing
|
||||||
can :view, :registrar_dashboard
|
can :view, :registrar_dashboard
|
||||||
can :manage, Invoice
|
can(:manage, Invoice) { |i| i.buyer_id == @user.registrar_id }
|
||||||
can :manage, :deposit
|
can :manage, :deposit
|
||||||
can :read, AccountActivity
|
can :read, AccountActivity
|
||||||
end
|
end
|
||||||
|
|
|
@ -522,7 +522,7 @@ describe 'EPP Contact', epp: true do
|
||||||
authInfo: { pw: { value: 'newpassword' } }
|
authInfo: { pw: { value: 'newpassword' } }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
puts Nokogiri xml
|
|
||||||
response = epp_plain_request(xml, :xml)
|
response = epp_plain_request(xml, :xml)
|
||||||
response[:results][0][:msg].should == 'Command completed successfully'
|
response[:results][0][:msg].should == 'Command completed successfully'
|
||||||
response[:results][0][:result_code].should == '1000'
|
response[:results][0][:result_code].should == '1000'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue