We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e0a5576 + cc32bfd commit 26219adCopy full SHA for 26219ad
src/main/java/com/appirio/tech/core/service/identity/resource/UserResource.java
@@ -820,6 +820,11 @@ public ApiResponse changePassword(
820
throw new APIRuntimeException(SC_UNAUTHORIZED, "Credentials are incorrect.");
821
}
822
823
+ // SSO users can't reset their password.
824
+ List<UserProfile> ssoProfiles = userDao.getSSOProfiles(Utils.toLongValue(user.getId()));
825
+ if(ssoProfiles!=null && ssoProfiles.size()>0)
826
+ throw new APIRuntimeException(HttpURLConnection.HTTP_FORBIDDEN, MSG_TEMPLATE_NOT_ALLOWED_TO_RESET_PASSWORD);
827
+
828
String error = user.validatePassoword();
829
if (error != null) {
830
throw new APIRuntimeException(SC_BAD_REQUEST, error);
0 commit comments