
250414 하석형 게시판댓글 수정삭제권한 처리, 사용자권한 - 기본권한 추가삭제 불가 처리
@cf71d3a5f890703753b1ad269ae52c8843b45dac
--- client/views/component/comment/CommentItem.vue
+++ client/views/component/comment/CommentItem.vue
... | ... | @@ -24,27 +24,27 @@ |
24 | 24 |
</div> |
25 | 25 |
|
26 | 26 |
<div class="flex justify-end align-center mb10"> |
27 |
- <button v-if="comment.isUpdate != true" :class="{ |
|
28 |
- 'ml5 comment-item-btn icon-btn radius pd5': true, |
|
29 |
- 'green': !showReplyInput[comment.cmntId], |
|
30 |
- 'gray': showReplyInput[comment.cmntId], |
|
31 |
- }" @click="toggleReplyInput(comment.cmntId)"> |
|
27 |
+ <button v-if="comment.useYn == 'Y' && comment.isUpdate != true" |
|
28 |
+ :class="{ |
|
29 |
+ 'ml5 comment-item-btn icon-btn radius pd5': true, |
|
30 |
+ 'green': !showReplyInput[comment.cmntId], |
|
31 |
+ 'gray': showReplyInput[comment.cmntId], |
|
32 |
+ }" @click="toggleReplyInput(comment.cmntId)"> |
|
32 | 33 |
{{ showReplyInput[comment.cmntId] ? "취소" : "답글 달기" }} |
33 | 34 |
</button> |
34 | 35 |
|
35 |
- <button v-if=" |
|
36 |
- (roles[0].authority == 'ROLE_ADMIN' || mbrId == comment.rgtr) && |
|
37 |
- !showReplyInput[comment.cmntId] |
|
38 |
- " :class="{ |
|
39 |
- 'ml5 comment-item-btn icon-btn radius pd5': true, |
|
40 |
- 'dark-gray': pageRole == 'adm', |
|
41 |
- 'dark-gray': |
|
42 |
- pageRole == 'portal', |
|
43 |
- }" @click="fnUpdate(comment)"> |
|
36 |
+ <button v-if="comment.useYn == 'Y' && mbrId == comment.rgtr && !showReplyInput[comment.cmntId]" |
|
37 |
+ :class="{ |
|
38 |
+ 'ml5 comment-item-btn icon-btn radius pd5': true, |
|
39 |
+ 'dark-gray': pageRole == 'adm', |
|
40 |
+ 'dark-gray': |
|
41 |
+ pageRole == 'portal', |
|
42 |
+ }" @click="fnUpdate(comment)"> |
|
44 | 43 |
수정 |
45 | 44 |
</button> |
46 | 45 |
|
47 |
- <button v-if="roles[0].authority == 'ROLE_ADMIN' || mbrId == comment.rgtr" @click="fnDeleteCmnt(comment.cmntId)" |
|
46 |
+ <button v-if="comment.useYn == 'Y' && (roles[0].authority == 'ROLE_ADMIN' || mbrId == comment.rgtr)" |
|
47 |
+ @click="fnDeleteCmnt(comment.cmntId)" |
|
48 | 48 |
class="ml5 icon-btn red radius pd5"> |
49 | 49 |
삭제 |
50 | 50 |
</button> |
--- client/views/component/userInfo/UserAuthorList.vue
+++ client/views/component/userInfo/UserAuthorList.vue
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 |
> |
13 | 13 |
<span>{{ auth.authrtNm }}</span> |
14 | 14 |
<button |
15 |
- v-show="editMode != 'view'" |
|
15 |
+ v-show="editMode != 'view' && auth.sysPvsnYn == '1'" |
|
16 | 16 |
class="icon-btn" |
17 | 17 |
@click="fnAuthDelete(index)" |
18 | 18 |
> |
... | ... | @@ -116,7 +116,11 @@ |
116 | 116 |
// axios: 사용자권한 목록 조회 |
117 | 117 |
async fnAuthViewList() { |
118 | 118 |
try { |
119 |
- const response = await findAllSystem(); |
|
119 |
+ let params = { |
|
120 |
+ useYn: 'Y', |
|
121 |
+ sysPvsnYn: '1', |
|
122 |
+ }; |
|
123 |
+ const response = await findAllSystem(params); |
|
120 | 124 |
this.originalList = response.data.data; |
121 | 125 |
} catch (error) { |
122 | 126 |
alert("에러가 발생했습니다.\n관리자에게 문의해주세요."); |
... | ... | @@ -128,6 +132,7 @@ |
128 | 132 |
mbrId: this.mbrVO.mbrId, |
129 | 133 |
authrtNm: authrt.authrtNm, |
130 | 134 |
authrtCd: authrt.authrtCd, |
135 |
+ sysPvsnYn: authrt.sysPvsnYn, |
|
131 | 136 |
rgtr: null, |
132 | 137 |
regDt: null, |
133 | 138 |
}); |
... | ... | @@ -155,10 +160,10 @@ |
155 | 160 |
|
156 | 161 |
// 사용자권한 삭제 |
157 | 162 |
fnAuthDelete(index) { |
158 |
- if (this.mbrVO.authorList.length < 2) { |
|
159 |
- alert("사용자 권한은 최소 1개 이상 존재해야 합니다."); |
|
160 |
- return; |
|
161 |
- } |
|
163 |
+ // if (this.mbrVO.authorList.length < 2) { |
|
164 |
+ // alert("사용자 권한은 최소 1개 이상 존재해야 합니다."); |
|
165 |
+ // return; |
|
166 |
+ // } |
|
162 | 167 |
this.mbrVO.authorList.splice(index, 1); |
163 | 168 |
}, |
164 | 169 |
}, |
--- client/views/component/userInfo/UserInfoInsert.vue
+++ client/views/component/userInfo/UserInfoInsert.vue
... | ... | @@ -588,10 +588,10 @@ |
588 | 588 |
} |
589 | 589 |
} |
590 | 590 |
// 사용자 권한 |
591 |
- if (this.mbrVO.authorList.length < 1) { |
|
592 |
- alert("사용자의 권한을 최소 1개 이상 추가하세요."); |
|
593 |
- return false; |
|
594 |
- } |
|
591 |
+ // if (this.mbrVO.authorList.length < 1) { |
|
592 |
+ // alert("사용자의 권한을 최소 1개 이상 추가하세요."); |
|
593 |
+ // return false; |
|
594 |
+ // } |
|
595 | 595 |
} |
596 | 596 |
} |
597 | 597 |
|
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?