Don't allow non-active registrars to create domains or applications

Specifically, this prevents suspended registrars from creating domains or applications. Pending registrars already can't perform these actions because they get an error message when attempting to log in.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=170481338
This commit is contained in:
mcilwain 2017-09-29 07:42:40 -07:00 committed by Ben McIlwain
parent d09bd89629
commit 1c4e79f99e
14 changed files with 89 additions and 21 deletions

View file

@ -768,7 +768,7 @@ public class RdapJsonFormatter {
ImmutableMap.Builder<String, Object> jsonBuilder = new ImmutableMap.Builder<>();
jsonBuilder.put("objectClassName", "entity");
jsonBuilder.put("handle", registrar.getIanaIdentifier().toString());
jsonBuilder.put("status", registrar.isActive() ? STATUS_LIST_ACTIVE : STATUS_LIST_REMOVED);
jsonBuilder.put("status", registrar.isLive() ? STATUS_LIST_ACTIVE : STATUS_LIST_REMOVED);
jsonBuilder.put("roles", ImmutableList.of(RdapEntityRole.REGISTRAR.rfc7483String));
jsonBuilder.put("links",
ImmutableList.of(makeLink("entity", registrar.getIanaIdentifier().toString(), linkBase)));