Example #1
0
 void initRequestAttributes(final PwmRequest pwmRequest) throws PwmUnrecoverableException {
   final ConfigurationReader configurationReader =
       pwmRequest.getContextManager().getConfigReader();
   pwmRequest.setAttribute(
       PwmRequest.Attribute.PageTitle,
       LocaleHelper.getLocalizedMessage(Config.Title_ConfigManager, pwmRequest));
   pwmRequest.setAttribute(
       PwmRequest.Attribute.ApplicationPath,
       pwmRequest.getPwmApplication().getPwmEnvironment().getApplicationPath().getAbsolutePath());
   pwmRequest.setAttribute(
       PwmRequest.Attribute.ConfigFilename, configurationReader.getConfigFile().getAbsolutePath());
   {
     final Date lastModifyTime = configurationReader.getStoredConfiguration().modifyTime();
     final String output =
         lastModifyTime == null
             ? LocaleHelper.getLocalizedMessage(Display.Value_NotApplicable, pwmRequest)
             : PwmConstants.DEFAULT_DATETIME_FORMAT.format(lastModifyTime);
     pwmRequest.setAttribute(PwmRequest.Attribute.ConfigLastModified, output);
   }
   pwmRequest.setAttribute(
       PwmRequest.Attribute.ConfigHasPassword,
       LocaleHelper.booleanString(
           configurationReader.getStoredConfiguration().hasPassword(),
           pwmRequest.getLocale(),
           pwmRequest.getConfig()));
 }
Example #2
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);
 }
Example #3
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);
 }