-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MPP-3753: Disable DomainAddress address field updates #4519
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small change recommended. Is there a PR to the locales repo for the new error too?
emails/models.py
Outdated
class DomainAddrUpdateException(CannotMakeAddressException): | ||
"""Exception raised when attempting to edit an existing domain address field.""" | ||
|
||
default_code = "address_exists" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default_code = "address_exists" | |
default_code = "address_not_editable" |
The previous error code makes it confusing to another error where the domain address cannot be created because an address exists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed these changes, 08417ec
@@ -560,6 +560,49 @@ def test_patch_domainaddress_read_only_mask_type( | |||
assert get_glean_event(caplog) is None | |||
|
|||
|
|||
def test_patch_domainaddress_address_fails( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 on tests!
Put a PR up here, mozilla-l10n/fx-private-relay-l10n#169. Also looks like |
This was handled in PR #4519 by making it an error.
This PR fixes MPP-3753.
New feature description
Disables updates to the address field for DomainAddress'.
Screenshot (if applicable)
Not applicable.
How to test
Log in or create account with premium emails and a domain locally
Create a new domain mask
Go to api/v1/docs/#/domainaddresses/domainaddresses_list, select GET /api/v1/domainaddresses/, click “Try it out”, scroll down and then click “Execute”, to get the list of domain addresses. Get the ID for the new domain mask.
Still on api/v1/docs/#/domainaddresses/domainaddresses_list, select PATCH /api/v1/domainaddresses/{id}/. Click “Try it out”, enter the ID for the new domain mask, and enter JSON that changes the address, such as {"address": "Huh-You-Can-Change-This"}.
Checklist (Definition of Done)
/frontend/src/styles/tokens.scss
).