Only show OT&E admin actions when not in production environment

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237061813
This commit is contained in:
jianglai 2019-03-06 09:27:36 -08:00
parent 6b9b60d38c
commit 90e298fb39
10 changed files with 38 additions and 19 deletions

View file

@ -27,6 +27,7 @@ import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserServiceFactory;
import com.google.common.collect.ImmutableSetMultimap;
import com.google.common.net.MediaType;
import google.registry.config.RegistryEnvironment;
import google.registry.request.auth.AuthLevel;
import google.registry.request.auth.AuthResult;
import google.registry.request.auth.AuthenticatedRegistrarAccessor;
@ -78,6 +79,7 @@ public class ConsoleUiActionTest {
action.paramClientId = Optional.empty();
AuthResult authResult = AuthResult.create(AuthLevel.USER, UserAuthInfo.create(user, false));
action.authResult = authResult;
action.environment = RegistryEnvironment.UNITTEST;
action.registrarAccessor =
AuthenticatedRegistrarAccessor.createForTesting(