feat(dashboard): Add permission checks for scan and donation creation links
This commit is contained in:
parent
f5df252857
commit
838dcbfd7e
@ -85,6 +85,8 @@
|
||||
|
||||
<span>{$_("card-replacement-menu")}</span>
|
||||
</a>
|
||||
{/if}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("SCAN:CREATE")}
|
||||
<a
|
||||
class:activenav={$router.path.includes("/tools/scanclient/")}
|
||||
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-200 hover:text-gray-900 w-full font-semibold"
|
||||
@ -105,6 +107,8 @@
|
||||
|
||||
<span>{$_("scanclient")}</span>
|
||||
</a>
|
||||
{/if}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("DONATION:CREATE")}
|
||||
<a
|
||||
class:activenav={$router.path.includes("/tools/donationcreate/")}
|
||||
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-200 hover:text-gray-900 w-full font-semibold"
|
||||
@ -125,9 +129,11 @@
|
||||
|
||||
<span>{$_("donation-quick-add")}</span>
|
||||
</a>
|
||||
{/if}
|
||||
<h2 class="px-4 py-2 text-xs font-semibold text-gray-600 uppercase">
|
||||
{$_("management")}
|
||||
</h2>
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes("RUNNER:GET")}
|
||||
<a
|
||||
class:activenav={$router.path.includes("/runners/")}
|
||||
class="flex items-center px-4 py-3 transition cursor-pointer group hover:bg-gray-200 hover:text-gray-900 w-full font-semibold"
|
||||
|
Loading…
x
Reference in New Issue
Block a user