mirror of
https://github.com/google/nomulus.git
synced 2025-07-22 10:46:10 +02:00
Print GAE-UserId even when null
Also explicitly state that contacts missing GAE-UserId can't access the registrar console ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=200402953
This commit is contained in:
parent
2d4eeae26c
commit
646c6fa069
3 changed files with 18 additions and 7 deletions
|
@ -230,7 +230,8 @@ public class RegistrarContact extends ImmutableObject implements Jsonifiable {
|
|||
* Types: [ADMIN, WHOIS]
|
||||
* Visible in WHOIS as Admin contact: Yes
|
||||
* Visible in WHOIS as Technical contact: No
|
||||
* GAE-UserID: 1234567890}</pre>
|
||||
* GAE-UserID: 1234567890
|
||||
* Registrar-Console access: Yes}</pre>
|
||||
*/
|
||||
public String toStringMultilinePlainText() {
|
||||
StringBuilder result = new StringBuilder(256);
|
||||
|
@ -246,17 +247,21 @@ public class RegistrarContact extends ImmutableObject implements Jsonifiable {
|
|||
result
|
||||
.append("Visible in registrar WHOIS query as Admin contact: ")
|
||||
.append(getVisibleInWhoisAsAdmin() ? "Yes" : "No")
|
||||
.append("\n");
|
||||
.append('\n');
|
||||
result
|
||||
.append("Visible in registrar WHOIS query as Technical contact: ")
|
||||
.append(getVisibleInWhoisAsTech() ? "Yes" : "No")
|
||||
.append("\n");
|
||||
.append('\n');
|
||||
result
|
||||
.append(
|
||||
"Phone number and email visible in domain WHOIS query as "
|
||||
+ "Registrar Abuse contact info: ")
|
||||
.append(getVisibleInDomainWhoisAsAbuse() ? "Yes" : "No")
|
||||
.append("\n");
|
||||
.append('\n');
|
||||
result
|
||||
.append("Registrar-Console access: ")
|
||||
.append(getGaeUserId() != null ? "Yes" : "No")
|
||||
.append('\n');
|
||||
if (getGaeUserId() != null) {
|
||||
result.append("GAE-UserID: ").append(getGaeUserId()).append('\n');
|
||||
}
|
||||
|
|
|
@ -207,6 +207,7 @@ public class SyncRegistrarsSheetTest {
|
|||
+ "Visible in registrar WHOIS query as Technical contact: No\n"
|
||||
+ "Phone number and email visible in domain WHOIS query as "
|
||||
+ "Registrar Abuse contact info: No\n"
|
||||
+ "Registrar-Console access: No\n"
|
||||
+ "\n"
|
||||
+ "John Doe\n"
|
||||
+ "john.doe@example.tld\n"
|
||||
|
@ -217,6 +218,7 @@ public class SyncRegistrarsSheetTest {
|
|||
+ "Visible in registrar WHOIS query as Technical contact: Yes\n"
|
||||
+ "Phone number and email visible in domain WHOIS query as "
|
||||
+ "Registrar Abuse contact info: No\n"
|
||||
+ "Registrar-Console access: Yes\n"
|
||||
+ "GAE-UserID: light\n");
|
||||
assertThat(row)
|
||||
.containsEntry(
|
||||
|
@ -228,7 +230,8 @@ public class SyncRegistrarsSheetTest {
|
|||
+ "Visible in registrar WHOIS query as Admin contact: No\n"
|
||||
+ "Visible in registrar WHOIS query as Technical contact: No\n"
|
||||
+ "Phone number and email visible in domain WHOIS query as "
|
||||
+ "Registrar Abuse contact info: No\n");
|
||||
+ "Registrar Abuse contact info: No\n"
|
||||
+ "Registrar-Console access: No\n");
|
||||
assertThat(row).containsEntry("marketingContacts", "");
|
||||
assertThat(row).containsEntry("abuseContacts", "");
|
||||
assertThat(row).containsEntry("whoisInquiryContacts", "");
|
||||
|
@ -244,7 +247,8 @@ public class SyncRegistrarsSheetTest {
|
|||
+ "Visible in registrar WHOIS query as Admin contact: No\n"
|
||||
+ "Visible in registrar WHOIS query as Technical contact: No\n"
|
||||
+ "Phone number and email visible in domain WHOIS query as "
|
||||
+ "Registrar Abuse contact info: No\n");
|
||||
+ "Registrar Abuse contact info: No\n"
|
||||
+ "Registrar-Console access: No\n");
|
||||
assertThat(row).containsEntry("contactsMarkedAsWhoisAdmin", "");
|
||||
assertThat(row)
|
||||
.containsEntry(
|
||||
|
@ -259,6 +263,7 @@ public class SyncRegistrarsSheetTest {
|
|||
+ "Visible in registrar WHOIS query as Technical contact: Yes\n"
|
||||
+ "Phone number and email visible in domain WHOIS query as "
|
||||
+ "Registrar Abuse contact info: No\n"
|
||||
+ "Registrar-Console access: Yes\n"
|
||||
+ "GAE-UserID: light\n");
|
||||
assertThat(row).containsEntry("emailAddress", "nowhere@example.org");
|
||||
assertThat(row).containsEntry(
|
||||
|
|
|
@ -67,7 +67,8 @@ public class RegistrarContactCommandTest extends CommandTestCase<RegistrarContac
|
|||
"Visible in registrar WHOIS query as Admin contact: Yes",
|
||||
"Visible in registrar WHOIS query as Technical contact: No",
|
||||
"Phone number and email visible in domain WHOIS query as "
|
||||
+ "Registrar Abuse contact info: No");
|
||||
+ "Registrar Abuse contact info: No",
|
||||
"Registrar-Console access: No");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue