Browse Source

fix build issues

Jason Rivard 7 years ago
parent
commit
9f4b95f6bd

+ 2 - 2
server/pom.xml

@@ -182,7 +182,7 @@
                     <showDeprecation>true</showDeprecation>
                     <showWarnings>true</showWarnings>
                     <fork>true</fork>
-                    <compilerArgs>
+                    <compilerargs>
                         <arg>-Werror</arg>
                         <arg>-Xlint:all</arg>
                         <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
@@ -194,7 +194,7 @@
                         <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
                         <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
                         <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
-                    </compilerArgs>
+                    </compilerargs>
                 </configuration>
             </plugin>
             <plugin>

+ 31 - 0
server/src/main/java/password/pwm/config/option/HelpdeskUIMode.java

@@ -0,0 +1,31 @@
+/*
+ * Password Management Servlets (PWM)
+ * http://www.pwm-project.org
+ *
+ * Copyright (c) 2006-2009 Novell, Inc.
+ * Copyright (c) 2009-2017 The PWM Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+package password.pwm.config.option;
+
+public enum HelpdeskUIMode implements ConfigurationOption {
+    none,
+    type,
+    autogen,
+    both,
+    random,
+}

+ 4 - 4
server/src/main/java/password/pwm/http/servlet/helpdesk/HelpdeskClientDataBean.java

@@ -23,7 +23,7 @@
 package password.pwm.http.servlet.helpdesk;
 
 import password.pwm.config.option.HelpdeskClearResponseMode;
-import password.pwm.config.option.HelpDeskUIMode;
+import password.pwm.config.option.HelpdeskUIMode;
 import password.pwm.config.option.IdentityVerificationMethod;
 import password.pwm.config.option.MessageSendMethod;
 
@@ -37,7 +37,7 @@ public class HelpdeskClientDataBean implements Serializable {
     private Map<String,String> helpdesk_search_columns = new HashMap<>();
     private boolean helpdesk_setting_maskPasswords;
     private HelpdeskClearResponseMode helpdesk_setting_clearResponses;
-    private HelpDeskUIMode helpdesk_setting_PwUiMode;
+    private HelpdeskUIMode helpdesk_setting_PwUiMode;
     private MessageSendMethod helpdesk_setting_tokenSendMethod;
     private Map<String, ActionInformation> actions = new HashMap<>();
     private Map<String, Collection<IdentityVerificationMethod>> verificationMethods = new HashMap<>();
@@ -67,11 +67,11 @@ public class HelpdeskClientDataBean implements Serializable {
         this.helpdesk_setting_clearResponses = helpdesk_setting_clearResponses;
     }
 
-    public HelpDeskUIMode getHelpdesk_setting_PwUiMode() {
+    public HelpdeskUIMode getHelpdesk_setting_PwUiMode() {
         return helpdesk_setting_PwUiMode;
     }
 
-    public void setHelpdesk_setting_PwUiMode(final HelpDeskUIMode helpdesk_setting_PwUiMode) {
+    public void setHelpdesk_setting_PwUiMode(final HelpdeskUIMode helpdesk_setting_PwUiMode) {
         this.helpdesk_setting_PwUiMode = helpdesk_setting_PwUiMode;
     }
 

+ 4 - 4
server/src/main/java/password/pwm/http/servlet/helpdesk/HelpdeskDetailInfoBean.java

@@ -35,7 +35,7 @@ import lombok.Setter;
 import password.pwm.bean.ResponseInfoBean;
 import password.pwm.bean.UserIdentity;
 import password.pwm.config.PwmSetting;
-import password.pwm.config.option.HelpDeskUIMode;
+import password.pwm.config.option.HelpdeskUIMode;
 import password.pwm.config.option.ViewStatusFields;
 import password.pwm.config.profile.HelpdeskProfile;
 import password.pwm.config.profile.PwmPasswordRule;
@@ -280,9 +280,9 @@ public class HelpdeskDetailInfoBean implements Serializable {
         buttons.add(StandardButton.back);
 
         {
-            final HelpDeskUIMode uiMode =
-                    helpdeskProfile.readSettingAsEnum(PwmSetting.HELPDESK_SET_PASSWORD_MODE, HelpDeskUIMode.class);
-            if (uiMode != HelpDeskUIMode.none) {
+            final HelpdeskUIMode uiMode =
+                    helpdeskProfile.readSettingAsEnum(PwmSetting.HELPDESK_SET_PASSWORD_MODE, HelpdeskUIMode.class);
+            if (uiMode != HelpdeskUIMode.none) {
                 buttons.add(StandardButton.changePassword);
             }
         }

+ 8 - 8
server/src/main/java/password/pwm/http/servlet/helpdesk/HelpdeskServlet.java

@@ -37,7 +37,7 @@ import password.pwm.bean.UserIdentity;
 import password.pwm.config.Configuration;
 import password.pwm.config.PwmSetting;
 import password.pwm.config.option.HelpdeskClearResponseMode;
-import password.pwm.config.option.HelpDeskUIMode;
+import password.pwm.config.option.HelpdeskUIMode;
 import password.pwm.config.option.IdentityVerificationMethod;
 import password.pwm.config.option.MessageSendMethod;
 import password.pwm.config.profile.HelpdeskProfile;
@@ -212,7 +212,7 @@ public class HelpdeskServlet extends ControlledPwmServlet {
         { /// detail page
             returnValues.setHelpdesk_setting_maskPasswords(helpdeskProfile.readSettingAsBoolean(PwmSetting.HELPDESK_PASSWORD_MASKVALUE));
             returnValues.setHelpdesk_setting_clearResponses(helpdeskProfile.readSettingAsEnum(PwmSetting.HELPDESK_CLEAR_RESPONSES, HelpdeskClearResponseMode.class));
-            returnValues.setHelpdesk_setting_PwUiMode(helpdeskProfile.readSettingAsEnum(PwmSetting.HELPDESK_SET_PASSWORD_MODE, HelpDeskUIMode.class));
+            returnValues.setHelpdesk_setting_PwUiMode(helpdeskProfile.readSettingAsEnum(PwmSetting.HELPDESK_SET_PASSWORD_MODE, HelpdeskUIMode.class));
             returnValues.setHelpdesk_setting_tokenSendMethod(helpdeskProfile.readSettingAsEnum(PwmSetting.HELPDESK_TOKEN_SEND_METHOD, MessageSendMethod.class));
         }
         { //actions
@@ -1125,8 +1125,8 @@ public class HelpdeskServlet extends ControlledPwmServlet {
         );
 
         {
-            final HelpDeskUIMode mode = helpdeskProfile.readSettingAsEnum(PwmSetting.HELPDESK_SET_PASSWORD_MODE, HelpDeskUIMode.class);
-            if (mode == HelpDeskUIMode.none) {
+            final HelpdeskUIMode mode = helpdeskProfile.readSettingAsEnum(PwmSetting.HELPDESK_SET_PASSWORD_MODE, HelpdeskUIMode.class);
+            if (mode == HelpdeskUIMode.none) {
                 throw new PwmUnrecoverableException(new ErrorInformation(PwmError.ERROR_SECURITY_VIOLATION,"setting "
                         + PwmSetting.HELPDESK_SET_PASSWORD_MODE.toMenuLocationDebug(helpdeskProfile.getIdentifier(), pwmRequest.getLocale())
                         + " must not be set to none"));
@@ -1172,9 +1172,9 @@ public class HelpdeskServlet extends ControlledPwmServlet {
         );
 
         HelpdeskServletUtil.checkIfUserIdentityViewable(pwmRequest, helpdeskProfile, userIdentity);
-        final HelpDeskUIMode mode = helpdeskProfile.readSettingAsEnum(PwmSetting.HELPDESK_SET_PASSWORD_MODE, HelpDeskUIMode.class);
+        final HelpdeskUIMode mode = helpdeskProfile.readSettingAsEnum(PwmSetting.HELPDESK_SET_PASSWORD_MODE, HelpdeskUIMode.class);
 
-        if (mode == HelpDeskUIMode.none) {
+        if (mode == HelpdeskUIMode.none) {
             throw new PwmUnrecoverableException(new ErrorInformation(PwmError.ERROR_SECURITY_VIOLATION,"setting "
                     + PwmSetting.HELPDESK_SET_PASSWORD_MODE.toMenuLocationDebug(helpdeskProfile.getIdentifier(), pwmRequest.getLocale())
                     + " must not be set to none"));
@@ -1183,7 +1183,7 @@ public class HelpdeskServlet extends ControlledPwmServlet {
 
         final PasswordData newPassword;
         if (jsonInput.getPassword() == null) {
-            if (mode != HelpDeskUIMode.random) {
+            if (mode != HelpdeskUIMode.random) {
                 throw new PwmUnrecoverableException(new ErrorInformation(PwmError.ERROR_SECURITY_VIOLATION,"setting "
                         + PwmSetting.HELPDESK_SET_PASSWORD_MODE.toMenuLocationDebug(helpdeskProfile.getIdentifier(), pwmRequest.getLocale())
                         + " is set to " + mode + " and no password is included in request"));
@@ -1201,7 +1201,7 @@ public class HelpdeskServlet extends ControlledPwmServlet {
                     pwmRequest.getPwmApplication()
             );
         } else {
-            if (mode == HelpDeskUIMode.random) {
+            if (mode == HelpdeskUIMode.random) {
                 throw new PwmUnrecoverableException(new ErrorInformation(PwmError.ERROR_SECURITY_VIOLATION,"setting "
                         + PwmSetting.HELPDESK_SET_PASSWORD_MODE.toMenuLocationDebug(helpdeskProfile.getIdentifier(), pwmRequest.getLocale())
                         + " is set to autogen yet a password is included in request"));