mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-23 19:06:35 +00:00
fix: remove redirect from /admin to /admin/general as some users may not have permission to the general settings
This commit is contained in:
@@ -16,7 +16,9 @@
|
||||
</SidebarMenuItem>
|
||||
<SidebarMenuItem v-if="userStore.hasAdminTabPermissions">
|
||||
<SidebarMenuButton asChild :isActive="route.path.startsWith('/admin')">
|
||||
<router-link :to="{ name: 'admin' }">
|
||||
<router-link
|
||||
:to="{ name: userStore.can('general_settings:manage') ? 'general' : 'admin' }"
|
||||
>
|
||||
<Shield />
|
||||
</router-link>
|
||||
</SidebarMenuButton>
|
||||
@@ -46,7 +48,7 @@
|
||||
@create-view="openCreateViewForm = true"
|
||||
@edit-view="editView"
|
||||
@delete-view="deleteView"
|
||||
@create-conversation="() => openCreateConversationDialog = true"
|
||||
@create-conversation="() => (openCreateConversationDialog = true)"
|
||||
>
|
||||
<div class="flex flex-col h-screen">
|
||||
<!-- Show app update only in admin routes -->
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
<template>
|
||||
<div class="overflow-y-auto h-screen">
|
||||
<div class="p-6 sm:p-8 min-h-full flex flex-col">
|
||||
<div
|
||||
class="flex flex-col items-center justify-center flex-grow"
|
||||
v-if="$route.path === '/admin'"
|
||||
>
|
||||
<div>Select a section from the sidebar</div>
|
||||
</div>
|
||||
<router-view class="flex-grow" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -155,12 +155,12 @@ const routes = [
|
||||
{
|
||||
path: '/admin',
|
||||
name: 'admin',
|
||||
redirect: '/admin/general',
|
||||
component: AdminLayout,
|
||||
meta: { title: 'Admin' },
|
||||
children: [
|
||||
{
|
||||
path: 'general',
|
||||
name: 'general',
|
||||
component: () => import('@/views/admin/general/General.vue'),
|
||||
meta: { title: 'General' }
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user