mirror of
https://github.com/google/nomulus
synced 2026-09-12 11:06:29 +00:00
Include the registry lock email in the JS object as a sensitive field (#658)
* Include the registry lock email in the JS object as a sensitive field * Change wording of exceptions to be more consistent
This commit is contained in:
@@ -454,7 +454,13 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
|
||||
.orElseThrow(
|
||||
() ->
|
||||
new FormException(
|
||||
"Not allowed to set registry lock password directly on new contact"));
|
||||
"Cannot set registry lock password directly on new contact"));
|
||||
// Can't modify registry lock email address
|
||||
if (!Objects.equals(
|
||||
updatedContact.getRegistryLockEmailAddress(),
|
||||
existingContact.getRegistryLockEmailAddress())) {
|
||||
throw new FormException("Cannot modify registryLockEmailAddress through the UI");
|
||||
}
|
||||
if (updatedContact.isRegistryLockAllowed()) {
|
||||
// the password must have been set before or the user was allowed to set it now
|
||||
if (!existingContact.isAllowedToSetRegistryLockPassword()
|
||||
@@ -464,7 +470,8 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
|
||||
}
|
||||
if (updatedContact.isAllowedToSetRegistryLockPassword()) {
|
||||
if (!existingContact.isAllowedToSetRegistryLockPassword()) {
|
||||
throw new FormException("Cannot set isAllowedToSetRegistryLockPassword through UI");
|
||||
throw new FormException(
|
||||
"Cannot modify isAllowedToSetRegistryLockPassword through the UI");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,7 +180,8 @@ registry.json.RegistrarAddress;
|
||||
* faxNumber: (string?|undefined),
|
||||
* types: (string?|undefined),
|
||||
* allowedToSetRegistryLockPassword: boolean,
|
||||
* registryLockAllowed: boolean
|
||||
* registryLockAllowed: boolean,
|
||||
* registryLockEmailAddress: (string?|undefined)
|
||||
* }}
|
||||
*/
|
||||
registry.json.RegistrarContact;
|
||||
|
||||
@@ -176,6 +176,10 @@
|
||||
{if isNonnull($item['gaeUserId'])}
|
||||
<input type="hidden" name="{$namePrefix}gaeUserId" value="{$item['gaeUserId']}">
|
||||
{/if}
|
||||
{if isNonnull($item['registryLockEmailAddress'])}
|
||||
<input type="hidden" name="{$namePrefix}registryLockEmailAddress"
|
||||
value="{$item['registryLockEmailAddress']}">
|
||||
{/if}
|
||||
</div>
|
||||
{/template}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user