Exemplo n.º 1
0
 private void showSummary(final PwmRequest pwmRequest)
     throws IOException, ServletException, PwmUnrecoverableException {
   final StoredConfigurationImpl storedConfiguration = readCurrentConfiguration(pwmRequest);
   final LinkedHashMap<String, Object> outputMap =
       new LinkedHashMap<>(storedConfiguration.toOutputMap(pwmRequest.getLocale()));
   pwmRequest.setAttribute(PwmRequest.Attribute.ConfigurationSummaryOutput, outputMap);
   pwmRequest.forwardToJsp(PwmConstants.JSP_URL.CONFIG_MANAGER_EDITOR_SUMMARY);
 }
Exemplo n.º 2
0
 private void showPermissions(final PwmRequest pwmRequest)
     throws IOException, ServletException, PwmUnrecoverableException {
   final StoredConfigurationImpl storedConfiguration = readCurrentConfiguration(pwmRequest);
   LDAPPermissionCalculator ldapPermissionCalculator =
       new LDAPPermissionCalculator(storedConfiguration);
   pwmRequest.setAttribute(
       PwmRequest.Attribute.ConfigurationSummaryOutput, ldapPermissionCalculator);
   pwmRequest.forwardToJsp(PwmConstants.JSP_URL.CONFIG_MANAGER_PERMISSIONS);
 }
Exemplo n.º 3
0
  protected void processAction(final PwmRequest pwmRequest)
      throws ServletException, IOException, ChaiUnavailableException, PwmUnrecoverableException {
    final PwmSession pwmSession = pwmRequest.getPwmSession();
    final ConfigManagerBean configManagerBean =
        pwmRequest
            .getPwmApplication()
            .getSessionStateService()
            .getBean(pwmRequest, ConfigManagerBean.class);

    final ConfigManagerAction processAction = readProcessAction(pwmRequest);
    if (processAction != null) {
      switch (processAction) {
        case lockConfiguration:
          restLockConfiguration(pwmRequest);
          break;

        case startEditing:
          doStartEditing(pwmRequest);
          break;

        case downloadConfig:
          doDownloadConfig(pwmRequest);
          break;

        case generateSupportZip:
          doGenerateSupportZip(pwmRequest);
          break;

        case uploadConfig:
          ConfigGuideServlet.restUploadConfig(pwmRequest);
          return;

        case uploadWordlist:
          restUploadWordlist(pwmRequest);
          return;

        case summary:
          showSummary(pwmRequest);
          return;

        case permissions:
          showPermissions(pwmRequest);
          return;
      }
      return;
    }

    initRequestAttributes(pwmRequest);
    pwmRequest.forwardToJsp(PwmConstants.JSP_URL.CONFIG_MANAGER_MODE_CONFIGURATION);
  }