@ -41,6 +41,8 @@ import TheSideBar from '~/components/organisms/layout/TheSideBar'
import TheHeader from '~/components/organisms/layout/TheHeader'
export default {
middleware: ['check-auth', 'auth', 'check-admin'],
components: {
TheSideBar,
TheHeader
@ -1,6 +1,8 @@
export default function ({ store, route, redirect }) {
const role = store.getters['projects/getCurrentUserRole']
if (!role.is_project_admin) {
redirect('/projects/' + route.params.id)
const projectRoot = '/projects/' + route.params.id
const path = route.fullPath.replace(/\/$/g, '')
if (!role.is_project_admin && path !== projectRoot) {
return redirect(projectRoot)
}
@ -16,8 +16,6 @@ import DocumentDeletionButton from '@/components/containers/documents/DocumentDe
layout: 'project',
DocumentList,
DocumentActionMenu,
@ -17,8 +17,6 @@ import { mapState, mapActions } from 'vuex'
Editor
},
@ -54,8 +54,6 @@
middleware: ['check-auth', 'auth'],
data() {
return {
e6: 1,
@ -16,8 +16,6 @@ import LabelDeletionButton from '@/components/containers/labels/LabelDeletionBut
LabelList,
LabelActionMenu,
@ -16,8 +16,6 @@ import MemberDeletionButton from '@/components/containers/members/MemberDeletion
MemberList,
MemberAdditionButton,
@ -41,8 +41,6 @@ import BarChart from '@/components/molecules/BarChart'
DoughnutChart,
BarChart