Skip to content

Commit

Permalink
disable "Set Password" button when old password have no otpSecret
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrenn committed Mar 7, 2024
1 parent 60c50e1 commit 18a8035
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/main/webapp/META-INF/includes/user/password.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@
actionListener="#{passwordBean.add}"
oncomplete="handleUpdateUserTabTitles(xhr, status, args)"
icon="ui-icon ui-icon-disk" ajax="true"
disabled="#{!passwordBean.createable or (!passwordBean.created and passwordBean.in.enable2fa)}"
disabled="#{!passwordBean.createable or ((!passwordBean.created or !passwordBean.out.hasOtpSecret) and passwordBean.in.enable2fa)}"
update="password_input,passwordadd_departmentpassword"/>

<p:commandButton process="@this,password_input"
Expand Down Expand Up @@ -461,7 +461,7 @@
onstart="setHiddenField('tabView:password_form:departmentPassword',passwordAddDepartmentPassword.getValue());passwordAddDepartmentPasswordDialog.hide();"
oncomplete="handleUpdateUserTabTitles(xhr, status, args)"
icon="ui-icon ui-icon-disk" ajax="true"
disabled="#{(!passwordBean.created and passwordBean.in.enable2fa)}"
disabled="#{((!passwordBean.created or !passwordBean.out.hasOtpSecret) and passwordBean.in.enable2fa)}"
update="password_input,passwordadd_departmentpassword" />
<p:commandButton process="@this,password_input"
id="addPasswordResetOtpSecretDepartment"
Expand Down

0 comments on commit 18a8035

Please sign in to comment.