فهرست منبع

PasswordPolicyValidator

Crystal.Sea 4 سال پیش
والد
کامیت
05a517a7a0

+ 6 - 0
maxkey-core/src/main/java/org/maxkey/persistence/db/PasswordPolicyValidator.java

@@ -231,6 +231,12 @@ public class PasswordPolicyValidator {
                         ConstantsPasswordSetType.PASSWORD_EXPIRED);
             }
         }
+        
+        //initial password need change
+        if(userInfo.getLoginCount()<=0) {
+            WebContext.getSession().setAttribute(WebConstants.CURRENT_LOGIN_USER_PASSWORD_SET_TYPE,
+                    ConstantsPasswordSetType.INITIAL_PASSWORD);
+        }
 
         return true;
     }

+ 1 - 1
maxkey-web-maxkey/src/main/resources/templates/views/passwordExpired.ftl

@@ -16,7 +16,7 @@
   <tr>
     <td>
 	<div>
-<form  id="actionForm"    method="post" type="label" autoclose="true"  action="<@base/>/safe/changeExpiredPassword"> 
+<form   method="post" type="label" autoclose="true"  action="<@base/>/safe/changeExpiredPassword"> 
 	
 	  <table  class="table table-bordered"  >
 			<tbody>

+ 2 - 2
maxkey-web-maxkey/src/main/resources/templates/views/passwordInitial.ftl

@@ -16,7 +16,7 @@
   <tr>
     <td>
 
-<form  id="actionForm"   method="post" type="label" autoclose="true"  action="<@base/>/safe/changeInitPassword"> 
+<form   method="post" type="label" autoclose="true"  action="<@base/>/safe/changeInitPassword"> 
 
 	  <table   class="table table-bordered"  >
 			<tbody>
@@ -52,7 +52,7 @@
 			<tr>
 				<td colspan="2"  class="center">
 					<input id="_method" type="hidden" name="_method"  value="post"/>
-		    		<input class="button btn btn-lg btn-primaryk" style="width:100px"  type="submit"    id="submitBtn" value=" code="button.text.save" />"/>
+		    		<input class="button btn btn-lg btn-primary" style="width:100px"  type="submit"    id="submitBtn" value="<@locale code="button.text.save" />"/>
 					
 				</td>
 			</tr>