Skip to content

Commit cbcb6d4

Browse files
Update phone disclosure message for legal entities
- Update `disclose_registrant_org_phone` to check for captcha, whitelist, and publishable status - Change phone disclosure message from 'Not Disclosed' to 'Not Disclosed - Visit www.internet.ee for web-based WHOIS' for legal entities - Update tests to reflect new phone disclosure message
1 parent a55c16e commit cbcb6d4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/presenters/registrant_presenter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def disclose_attr(attr)
2727
end
2828

2929
def disclose_registrant_org_phone
30-
if contact.attribute_disclosed?('phone')
30+
if contact.attribute_disclosed?('phone') && captcha_solved? || whitelisted_user? || registrant_publishable?
3131
contact.send('phone')
3232
else
3333
disclosable_mask

test/integration/whois_records/json_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def test_hide_sensitive_data_of_legal_entity_when_captcha_is_unsolved
125125
response_json = JSON.parse(response.body, symbolize_names: true)
126126

127127
assert_equal 'Not Disclosed - Visit www.internet.ee for web-based WHOIS', response_json[:email]
128-
assert_equal 'Not Disclosed', response_json[:phone]
128+
assert_equal 'Not Disclosed - Visit www.internet.ee for web-based WHOIS', response_json[:phone]
129129

130130
expected_admin_contacts = [
131131
{ name: 'Not Disclosed - Visit www.internet.ee for web-based WHOIS',
@@ -233,7 +233,7 @@ def test_hide_sensitive_data_of_legal_entity_when_ip_is_not_in_whitelist
233233
response_json = JSON.parse(response.body, symbolize_names: true)
234234

235235
assert_equal 'Not Disclosed - Visit www.internet.ee for web-based WHOIS', response_json[:email]
236-
assert_equal 'Not Disclosed', response_json[:phone]
236+
assert_equal 'Not Disclosed - Visit www.internet.ee for web-based WHOIS', response_json[:phone]
237237
assert_equal 'Not Disclosed - Visit www.internet.ee for web-based WHOIS',
238238
response_json[:registrant_changed]
239239

0 commit comments

Comments
 (0)