diff --git a/src/Header.vue b/src/Header.vue index 7e5b2f9..d0da98a 100644 --- a/src/Header.vue +++ b/src/Header.vue @@ -15,17 +15,15 @@ const currentDir = useCurrentDirStore(); const modalOpen = ref(false); function openModal() { - if(currentDir.userManagerPermissions) { - if(currentDir.organizationFolderResourceId) { - router.push({ - path: '/resource/' + currentDir.organizationFolderResourceId - }); - } else { - router.push({ - path: '/organizationFolder/' + currentDir.organizationFolderId - }); - } - + if(currentDir.organizationFolderResourceId && currentDir.organizationFolderResourceUpdatePermissions) { + router.push({ + path: '/resource/' + currentDir.organizationFolderResourceId + }); + modalOpen.value = true; + } else if(currentDir.organizationFolderId && currentDir.organizationFolderUpdatePermissions) { + router.push({ + path: '/organizationFolder/' + currentDir.organizationFolderId + }); modalOpen.value = true; } } @@ -33,7 +31,7 @@ function openModal() {