mirror of
https://github.com/google/nomulus
synced 2026-04-25 02:30:45 +00:00
Allow unsetting of the support email group, disabling "support users"
In addition to just making good sense to not have support group for some environments (local? unittest? crash?) - connecting with G Suit requires additional permissions that are harder to find. Specifically, it requires the Json Credentials that just aren't set in the Dummy Keyring used on some environments. So we make sure to not even *try* to create the credentials if the support email isn't set ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=225589255
This commit is contained in:
@@ -22,6 +22,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.base.Ascii;
|
||||
import com.google.common.base.Splitter;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.base.Supplier;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
@@ -424,8 +425,9 @@ public final class RegistryConfig {
|
||||
*/
|
||||
@Provides
|
||||
@Config("gSuiteSupportGroupEmailAddress")
|
||||
public static String provideGSuiteSupportGroupEmailAddress(RegistryConfigSettings config) {
|
||||
return config.gSuite.supportGroupEmailAddress;
|
||||
public static Optional<String> provideGSuiteSupportGroupEmailAddress(
|
||||
RegistryConfigSettings config) {
|
||||
return Optional.ofNullable(Strings.emptyToNull(config.gSuite.supportGroupEmailAddress));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user