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-03 14:29:05 -07:00 committed by Ben McIlwain
parent 151ae2558f
commit f3919e056d
9 changed files with 308 additions and 69 deletions

View file

@ -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() {