Allow admins to access registrar console without a RegistrarContact

This allows admins to access the registrar console without needing to be added
as a registrar contact. If they are a registrar contact, then that registrar
takes precedence.

Tested=In Alpha

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164182623
This commit is contained in:
bbilbo
2017-08-29 15:43:36 -04:00
committed by Ben McIlwain
parent 151ae2558f
commit f3919e056d
9 changed files with 308 additions and 69 deletions
@@ -931,6 +931,16 @@ public final class RegistryConfig {
return config.registryPolicy.checkApiServletClientId;
}
/**
* Returns the clientId of the registrar that admins are automatically logged in as if they
* aren't otherwise associated with one.
*/
@Provides
@Config("registryAdminClientId")
public static String provideRegistryAdminClientId(RegistryConfigSettings config) {
return config.registryPolicy.registryAdminClientId;
}
@Singleton
@Provides
static RegistryConfigSettings provideRegistryConfigSettings() {
@@ -78,6 +78,7 @@ public class RegistryConfigSettings {
public String tmchCrlUrl;
public String tmchMarksDbUrl;
public String checkApiServletClientId;
public String registryAdminClientId;
public String reservedTermsExportDisclaimer;
public String whoisDisclaimer;
}
@@ -71,6 +71,11 @@ registryPolicy:
# domain checks.
checkApiServletClientId: TheRegistrar
# The registry admin's registrar. Admins are granted permission to log in
# using this registrar automatically if they are not associated with any
# registrar
registryAdminClientId: TheRegistrar
# Disclaimer at the top of the exported reserved terms list.
reservedTermsExportDisclaimer: |
This list contains reserved terms for the TLD. Other terms may be reserved
@@ -29,6 +29,7 @@ registryPolicy:
tmchCrlUrl: http://crl.icann.org/tmch.crl
tmchMarksDbUrl: https://ry.marksdb.org
checkApiServletClientId: placeholder
registryAdminClientId: placeholder
whoisDisclaimer: |
multi-line
placeholder