EPP: Hide name from contactInfo if no auth provided

This commit is contained in:
Karl Erik Õunapuu 2020-11-17 14:40:18 +02:00
parent 331ade988c
commit c9ebdbeb40
No known key found for this signature in database
GPG key ID: C9DD647298A34764

View file

@ -14,7 +14,11 @@ xml.epp_head do
end
xml.tag!('contact:postalInfo', type: 'int') do
xml.tag!('contact:name', @contact.name)
if can? :view_full_info, @contact, @password
xml.tag!('contact:name', @contact.name)
else
xml.tag!('contact:name', 'No access')
end
if can? :view_full_info, @contact, @password
xml.tag!('contact:org', @contact.org_name) if @contact.org_name.present?