Implement "premium price ack required" checkbox

Implement a checkbox in the "Resources" tab to allow registrars to toggle
their "premium price ack required" flag.

Tested:
  Verfied the console functionality by hand.  I've started work on an
  automated test, but we can't actually test those from blaze and the
  kokoro tests are way too time-consuming to be practical for development, so
  we're going to have to either find a way to run those locally outside of
  the normal process or make do without a test.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190212177
This commit is contained in:
mmuller
2018-04-02 16:33:51 -04:00
committed by jianglai
parent f47965d5f6
commit 785225fc28
22 changed files with 423 additions and 50 deletions
@@ -67,8 +67,8 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
public static final String PATH = "/registrar-settings";
private static final String OP_PARAM = "op";
private static final String ARGS_PARAM = "args";
static final String OP_PARAM = "op";
static final String ARGS_PARAM = "args";
@Inject HttpServletRequest request;
@Inject JsonActionRunner jsonActionRunner;
@@ -93,7 +93,7 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
throw new BadRequestException("Malformed JSON");
}
Registrar initialRegistrar = sessionUtils.getRegistrarForAuthResult(request, authResult);
Registrar initialRegistrar = sessionUtils.getRegistrarForAuthResult(request, authResult, false);
// Process the operation. Though originally derived from a CRUD
// handler, registrar-settings really only supports read and update.
String op = Optional.ofNullable((String) input.get(OP_PARAM)).orElse("read");