Przeglądaj źródła

Merge remote-tracking branch 'origin/databank'

junekeunsong 4 lat temu
rodzic
commit
2f68694aa5

+ 1 - 1
src/main/java/com/lemon/lifecenter/controller/StaffController.java

@@ -125,7 +125,7 @@ public class StaffController extends LifeCenterController {
         }
         
         dto.setGroupIdx( Integer.valueOf( decryptIdx ) );
-        dto.setPassword( LifeCenterFunction.aesEncrypt( config.aesKey, config.IV, password ) );
+        dto.setPassword( LifeCenterFunction.sha256Encrypt(password) );
         
         memberService.insertStaff( dto );
         

+ 18 - 14
src/main/webapp/WEB-INF/jsp/center/info.jsp

@@ -6,20 +6,24 @@
     pageEncoding="UTF-8"%>
 <jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
 <script type="text/javascript">
-function reset() {
-    var resetCheck = confirm("비밀번호를 초기화 하시겠습니까?");
-    if (resetCheck == true) {
-        getAjax("/staff/passwordReset", $("#hiddenForm").serialize(), function ( result ) {
-            console.log( result );
-            if (result === true) {
-                alertBox({ txt :'비밀번호가 초기화 되었습니다.' });
+function pwReset() {
+    alertBox({ type : "confirm", 
+        txt : "비밀번호를 초기화 하시겠습니까?", 
+        callBack : function( result ){
+            if( result ){
+                getAjax("/staff/passwordReset", $("#hiddenForm").serialize(), function ( result ) {
+                    console.log( result );
+                    if (result === true) {
+                        alertBox({ txt :'비밀번호가 초기화 되었습니다.' });
+                    }
+                }, function(){
+                    alertBox({ txt : '비밀번호가 초기화에 실패하였습니다.' });
+                }, function(){
+                    
+                });
             }
-        }, function(){
-            alertBox({ txt :'비밀번호가 초기화에 실패하였습니다.' });
-        }, function(){
-            
-        });
-    }
+        }
+    });
 }
 
 </script>
@@ -134,7 +138,7 @@ function reset() {
                                     <div class="row mt-3">
                                         <div class="col-12">
                                             <div class="text-right">
-                                                <button class="btn btn-warning w150" onclick="reset();">비밀번호 초기화</button>
+                                                <button type="button" class="btn btn-warning w150" onclick="pwReset();">비밀번호 초기화</button>
                                                 <button type="button" class="btn btn-primary w100" onclick="location.href='./list';">확인</button>
                                             </div>
                                         </div>

+ 19 - 15
src/main/webapp/WEB-INF/jsp/staff/info.jsp

@@ -5,20 +5,24 @@
     pageEncoding="UTF-8"%>
 <jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
 <script type="text/javascript">
-function reset() {
-    var resetCheck = confirm("비밀번호를 초기화 하시겠습니까?");
-    if (resetCheck == true) {
-        getAjax("/staff/passwordReset", $("#hiddenForm").serialize(), function ( result ) {
-            console.log( result );
-            if (result === true) {
-                alertBox({ txt :'비밀번호가 초기화 되었습니다.' });
+function pwReset() {
+    alertBox({ type : "confirm", 
+        txt : "비밀번호를 초기화 하시겠습니까?", 
+        callBack : function( result ){
+            if( result ){
+                getAjax("/staff/passwordReset", $("#hiddenForm").serialize(), function ( result ) {
+                    console.log( result );
+                    if (result === true) {
+                        alertBox({ txt :'비밀번호가 초기화 되었습니다.' });
+                    }
+                }, function(){
+                    alertBox({ txt : '비밀번호가 초기화에 실패하였습니다.' });
+                }, function(){
+                    
+                });
             }
-        }, function(){
-            alertBox({ txt : '비밀번호가 초기화에 실패하였습니다.' });
-        }, function(){
-            
-        });
-    }
+        }
+    });
 }
 function deleteConfirm(){
     alertBox({ type : "confirm", 
@@ -166,10 +170,10 @@ function deleteConfirm(){
                                                         </c:if>
                                                     
                                                         <c:if test="${data._SES_GROUP_IDX ne '1'}">
-                                                            <button class="btn btn-warning w150" onclick="reset();">비밀번호 초기화</button>
+                                                            <button type="button" class="btn btn-warning w150" onclick="pwReset();">비밀번호 초기화</button>
                                                         </c:if>
                                                     </c:if>
-                                                    <button class="btn btn-primary w100" onclick="location.href='./list';">확인</button>
+                                                    <button type="button" class="btn btn-primary w100" onclick="location.href='./list';">확인</button>
                                                 </div>
                                             </div>
                                         </div>