pom updates and hekpdesk pw set ui mode api check fix

This commit is contained in:
Jason Rivard 2018-01-13 11:33:18 -08:00
parent 38607ce68b
commit e8d27c47b5
2 changed files with 12 additions and 11 deletions

View file

@ -252,7 +252,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.5</version>
<version>8.7</version>
</dependency>
</dependencies>
<executions>
@ -662,7 +662,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.1</version>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
@ -722,12 +722,12 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.58</version>
<version>1.59</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.58</version>
<version>1.59</version>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
@ -782,7 +782,7 @@
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<version>2.6.0</version>
<version>2.6.1</version>
</dependency>
<dependency>
<groupId>com.nulab-inc</groupId>

View file

@ -1110,7 +1110,10 @@ public class HelpdeskServlet extends ControlledPwmServlet {
);
final UserIdentity userIdentity = UserIdentity.fromKey(jsonInput.getUsername(), pwmRequest.getPwmApplication());
final HelpdeskProfile helpdeskProfile = pwmRequest.getPwmSession().getSessionManager().getHelpdeskProfile(pwmRequest.getPwmApplication());
final HelpdeskProfile helpdeskProfile = getHelpdeskProfile( pwmRequest );
HelpdeskServletUtil.checkIfUserIdentityViewable(pwmRequest, helpdeskProfile, userIdentity);
final ChaiUser chaiUser = getChaiUser(pwmRequest, getHelpdeskProfile(pwmRequest), userIdentity);
final UserInfo userInfo = UserInfoFactory.newUserInfo(
pwmRequest.getPwmApplication(),
@ -1120,18 +1123,15 @@ public class HelpdeskServlet extends ControlledPwmServlet {
chaiUser.getChaiProvider()
);
HelpdeskServletUtil.checkIfUserIdentityViewable(pwmRequest, helpdeskProfile, userIdentity);
{
final HelpdeskUIMode mode = helpdeskProfile.readSettingAsEnum(PwmSetting.HELPDESK_CLEAR_RESPONSES, HelpdeskUIMode.class);
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_CLEAR_RESPONSES.toMenuLocationDebug(helpdeskProfile.getIdentifier(), pwmRequest.getLocale())
+ PwmSetting.HELPDESK_SET_PASSWORD_MODE.toMenuLocationDebug(helpdeskProfile.getIdentifier(), pwmRequest.getLocale())
+ " must not be set to none"));
}
}
final PasswordUtility.PasswordCheckInfo passwordCheckInfo = PasswordUtility.checkEnteredPassword(
pwmRequest.getPwmApplication(),
pwmRequest.getLocale(),
@ -1143,6 +1143,7 @@ public class HelpdeskServlet extends ControlledPwmServlet {
);
final RestCheckPasswordServer.JsonOutput jsonResponse = RestCheckPasswordServer.JsonOutput.fromPasswordCheckInfo(passwordCheckInfo);
final RestResultBean restResultBean = RestResultBean.withData(jsonResponse);
pwmRequest.outputJsonResult(restResultBean);