Skip to content

Allow legal persons to send name and email in disclosed attributes - #2971

Open
OlegPhenomenon wants to merge 2 commits into
masterfrom
fix/org-registrant-disclosed-attributes
Open

OlegPhenomenon wants to merge 2 commits into
masterfrom
fix/org-registrant-disclosed-attributes

Conversation

@OlegPhenomenon

Copy link
Copy Markdown
Contributor

Problem

Registrant center fails to save org contacts with 400 Bad Request (reported by OÜ Otetaru, 11.10.2026):

{"errors":[{"disclosed_attributes":["Legal person's data is visible by default and cannot be concealed. Please remove this parameter."]}]}

Registrant center sends name and email in disclosed_attributes for org contacts (WhoIsEdit adds them for org registrants; DomainEditPage merges in attributes already stored on the contact). The API allowed only phone for legal persons (Contact::OPEN_LEGAL_ATTRIBUTES, since 86fad85 / #2488), so any save of such a contact failed — including plain email/phone changes. The frontend shows a generic "check phone format" message for every 400, hiding the real reason.

Change

Tests

  • Regression test reproducing the production request (org with stored name/email updating email and phone): fails on master with the exact production response, passes with the fix.
  • test/integration/api/v1/registrant/ + test/models/contact_test.rb: 74 runs, 0 failures.

Registrant center sends name and email in disclosed_attributes for org
contacts (WhoIsEdit adds them for org registrants, DomainEditPage merges
in attributes already stored on the contact). The registrant API only
allowed phone for legal persons, so every save of such a contact failed
with 400 "Legal person's data is visible by default and cannot be
concealed", including plain email/phone changes.

Accept name, email and phone for org contacts; address, fax and
registrant_publishable are still rejected.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants