refac
This commit is contained in:
1 parent
ccb71a7322
commit
4d024c91d6
1 file changed
+13
-11
@@ -36,6 +36,8 @@
|
|||||||
goto('/');
|
goto('/');
|
||||||
} else if ($page.url.pathname.includes('/tools') && !$user?.permissions?.workspace?.tools) {
|
} else if ($page.url.pathname.includes('/tools') && !$user?.permissions?.workspace?.tools) {
|
||||||
goto('/');
|
goto('/');
|
||||||
|
} else if ($page.url.pathname.includes('/skills') && !$user?.permissions?.workspace?.skills) {
|
||||||
|
goto('/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,17 +113,6 @@
|
|||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.tools}
|
|
||||||
<a
|
|
||||||
class="min-w-fit p-1.5 {$page.url.pathname.includes('/workspace/tools')
|
|
||||||
? ''
|
|
||||||
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition"
|
|
||||||
href="/workspace/tools"
|
|
||||||
>
|
|
||||||
{$i18n.t('Tools')}
|
|
||||||
</a>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.skills}
|
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.skills}
|
||||||
<a
|
<a
|
||||||
class="min-w-fit p-1.5 {$page.url.pathname.includes('/workspace/skills')
|
class="min-w-fit p-1.5 {$page.url.pathname.includes('/workspace/skills')
|
||||||
@@ -132,6 +123,17 @@
|
|||||||
{$i18n.t('Skills')}
|
{$i18n.t('Skills')}
|
||||||
</a>
|
</a>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.tools}
|
||||||
|
<a
|
||||||
|
class="min-w-fit p-1.5 {$page.url.pathname.includes('/workspace/tools')
|
||||||
|
? ''
|
||||||
|
: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition"
|
||||||
|
href="/workspace/tools"
|
||||||
|
>
|
||||||
|
{$i18n.t('Tools')}
|
||||||
|
</a>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user