하석형 하석형 04-14
250414 하석형 게시판댓글 수정삭제권한 처리, 사용자권한 - 기본권한 추가삭제 불가 처리
@cf71d3a5f890703753b1ad269ae52c8843b45dac
client/resources/api/author.js
--- client/resources/api/author.js
+++ client/resources/api/author.js
@@ -1,6 +1,6 @@
 import apiClient from "./index";
 
 // 사용자 권한 목록 조회
-export const findAllSystem = () => {
-  return apiClient.post(`/admin/auth/findAllSystem.json`);
+export const findAllSystem = params => {
+  return apiClient.post(`/admin/auth/findAllSystem.json`, params);
 }
(파일 끝에 줄바꿈 문자 없음)
client/views/component/comment/CommentItem.vue
--- client/views/component/comment/CommentItem.vue
+++ client/views/component/comment/CommentItem.vue
@@ -24,27 +24,27 @@
       </div>
 
     <div class="flex justify-end align-center mb10">
-      <button v-if="comment.isUpdate != true" :class="{
-        'ml5 comment-item-btn icon-btn  radius pd5': true,
-        'green': !showReplyInput[comment.cmntId],
-        'gray': showReplyInput[comment.cmntId],
-      }" @click="toggleReplyInput(comment.cmntId)">
+      <button v-if="comment.useYn == 'Y' && comment.isUpdate != true"
+        :class="{
+          'ml5 comment-item-btn icon-btn  radius pd5': true,
+          'green': !showReplyInput[comment.cmntId],
+          'gray': showReplyInput[comment.cmntId],
+        }" @click="toggleReplyInput(comment.cmntId)">
         {{ showReplyInput[comment.cmntId] ? "취소" : "답글 달기" }}
       </button>
 
-      <button v-if="
-        (roles[0].authority == 'ROLE_ADMIN' || mbrId == comment.rgtr) &&
-        !showReplyInput[comment.cmntId]
-      " :class="{
-            'ml5 comment-item-btn icon-btn radius pd5': true,
-            'dark-gray': pageRole == 'adm',
-            'dark-gray':
-              pageRole == 'portal',
-          }" @click="fnUpdate(comment)">
+      <button v-if="comment.useYn == 'Y' && mbrId == comment.rgtr && !showReplyInput[comment.cmntId]"
+        :class="{
+          'ml5 comment-item-btn icon-btn radius pd5': true,
+          'dark-gray': pageRole == 'adm',
+          'dark-gray':
+            pageRole == 'portal',
+        }" @click="fnUpdate(comment)">
         수정
       </button>
 
-      <button v-if="roles[0].authority == 'ROLE_ADMIN' || mbrId == comment.rgtr" @click="fnDeleteCmnt(comment.cmntId)"
+      <button v-if="comment.useYn == 'Y' && (roles[0].authority == 'ROLE_ADMIN' || mbrId == comment.rgtr)"
+        @click="fnDeleteCmnt(comment.cmntId)"
         class="ml5 icon-btn red radius pd5">
         삭제
       </button>
client/views/component/userInfo/UserAuthorList.vue
--- client/views/component/userInfo/UserAuthorList.vue
+++ client/views/component/userInfo/UserAuthorList.vue
@@ -12,7 +12,7 @@
         >
           <span>{{ auth.authrtNm }}</span>
           <button
-            v-show="editMode != 'view'"
+            v-show="editMode != 'view' && auth.sysPvsnYn == '1'"
             class="icon-btn"
             @click="fnAuthDelete(index)"
           >
@@ -116,7 +116,11 @@
     // axios: 사용자권한 목록 조회
     async fnAuthViewList() {
       try {
-        const response = await findAllSystem();
+        let params = {
+          useYn: 'Y',
+          sysPvsnYn: '1',
+        };
+        const response = await findAllSystem(params);
         this.originalList = response.data.data;
       } catch (error) {
         alert("에러가 발생했습니다.\n관리자에게 문의해주세요.");
@@ -128,6 +132,7 @@
         mbrId: this.mbrVO.mbrId,
         authrtNm: authrt.authrtNm,
         authrtCd: authrt.authrtCd,
+        sysPvsnYn: authrt.sysPvsnYn,
         rgtr: null,
         regDt: null,
       });
@@ -155,10 +160,10 @@
 
     // 사용자권한 삭제
     fnAuthDelete(index) {
-      if (this.mbrVO.authorList.length < 2) {
-        alert("사용자 권한은 최소 1개 이상 존재해야 합니다.");
-        return;
-      }
+      // if (this.mbrVO.authorList.length < 2) {
+      //   alert("사용자 권한은 최소 1개 이상 존재해야 합니다.");
+      //   return;
+      // }
       this.mbrVO.authorList.splice(index, 1);
     },
   },
client/views/component/userInfo/UserInfoInsert.vue
--- client/views/component/userInfo/UserInfoInsert.vue
+++ client/views/component/userInfo/UserInfoInsert.vue
@@ -588,10 +588,10 @@
             }
           }
           // 사용자 권한
-          if (this.mbrVO.authorList.length < 1) {
-            alert("사용자의 권한을 최소 1개 이상 추가하세요.");
-            return false;
-          }
+          // if (this.mbrVO.authorList.length < 1) {
+          //   alert("사용자의 권한을 최소 1개 이상 추가하세요.");
+          //   return false;
+          // }
         }
       }
 
client/views/pages/adm/authority/menuAuthority/MenuAuthority.vue
--- client/views/pages/adm/authority/menuAuthority/MenuAuthority.vue
+++ client/views/pages/adm/authority/menuAuthority/MenuAuthority.vue
@@ -129,7 +129,10 @@
     // axios: 권한 조회(목록)
     async fnViewList() {
       try {
-        const res = await findAllSystem();
+        let params = {
+          useYn: "Y",
+        }
+        const res = await findAllSystem(params);
         if (res.status == 200) {
           if (res.data.data.length > 0) {
             let newData = [];
Add a comment
List