Merge pull request #1447 from internetee/fix-epp-response

Hide contact password unless the current registrar is sponsoring
This commit is contained in:
Timo Võhmar 2020-01-14 13:31:30 +02:00 committed by GitHub
commit 844e613ee1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 8 deletions

View file

@ -65,14 +65,9 @@ xml.epp_head do
xml.tag!('contact:upID', upID) if upID.present? # optional upID
xml.tag!('contact:upDate', @contact.updated_at.try(:iso8601))
end
# xml.tag!('contact:trDate', '123') if false
if can? :view_password, @contact, @password
xml.tag!('contact:authInfo') do
xml.tag!('contact:pw', @contact.auth_info)
end
else
xml.tag!('contact:authInfo') do
xml.tag!('contact:pw', 'No access')
xml.tag!('contact:pw', @contact.auth_info)
end
end
end