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 d42eeb3755
commit 204cb8e886
10 changed files with 38 additions and 19 deletions

View file

@ -60,6 +60,7 @@ registry.registrar.ConsoleTestUtil.renderConsoleMain = function(
announcementsEmail: args.announcementsEmail || 'announcement@example.com',
supportPhoneNumber: args.supportPhoneNumber || '+1 (888) 555 0123',
technicalDocsUrl: args.technicalDocsUrl || 'http://example.com/techdocs',
environment: args.environment || 'UNITTEST',
});
};

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(

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Before After
Before After