fix(content): 관리 컬럼과 버튼을 ADMIN 권한에만 표시
배경: 비ADMIN 계정에서도 관리 열과 수정/삭제/공유 버튼이 노출되어 접근 혼란을 유발. 변경: computed isAdmin(Vuex accountStore.role 우선, localStorage 폴백) 추가 후, 테이블 헤더와 각 행의 관리 영역에 v-if="isAdmin" 적용. 영향: ADMIN 외 권한에서는 UI 요소가 렌더링되지 않음. 기능 동작 변경 없음.
This commit is contained in:
@@ -96,7 +96,10 @@
|
|||||||
<th class="text-center">
|
<th class="text-center">
|
||||||
오픈 예정일
|
오픈 예정일
|
||||||
</th>
|
</th>
|
||||||
<th class="text-center">
|
<th
|
||||||
|
v-if="isAdmin"
|
||||||
|
class="text-center"
|
||||||
|
>
|
||||||
관리
|
관리
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -214,7 +217,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>{{ item.date }}</td>
|
<td>{{ item.date }}</td>
|
||||||
<td>{{ item.releaseDate }}</td>
|
<td>{{ item.releaseDate }}</td>
|
||||||
<td>
|
<td v-if="isAdmin">
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-btn
|
<v-btn
|
||||||
@@ -527,6 +530,14 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
isAdmin() {
|
||||||
|
const role = (this.$store && this.$store.state && this.$store.state.accountStore && this.$store.state.accountStore.role)
|
||||||
|
|| (typeof localStorage !== 'undefined' ? localStorage.role : '');
|
||||||
|
return role === 'ADMIN';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
async created() {
|
async created() {
|
||||||
this.audio_content = {
|
this.audio_content = {
|
||||||
id: null,
|
id: null,
|
||||||
|
|||||||
Reference in New Issue
Block a user