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>
|
<span>{$_("card-replacement-menu")}</span>
|
||||||
</a>
|
</a>
|
||||||
|
{/if}
|
||||||
|
{#if store.state.jwtinfo.userdetails.permissions.includes("SCAN:CREATE")}
|
||||||
<a
|
<a
|
||||||
class:activenav={$router.path.includes("/tools/scanclient/")}
|
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"
|
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>
|
<span>{$_("scanclient")}</span>
|
||||||
</a>
|
</a>
|
||||||
|
{/if}
|
||||||
|
{#if store.state.jwtinfo.userdetails.permissions.includes("DONATION:CREATE")}
|
||||||
<a
|
<a
|
||||||
class:activenav={$router.path.includes("/tools/donationcreate/")}
|
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"
|
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>
|
<span>{$_("donation-quick-add")}</span>
|
||||||
</a>
|
</a>
|
||||||
|
{/if}
|
||||||
<h2 class="px-4 py-2 text-xs font-semibold text-gray-600 uppercase">
|
<h2 class="px-4 py-2 text-xs font-semibold text-gray-600 uppercase">
|
||||||
{$_("management")}
|
{$_("management")}
|
||||||
</h2>
|
</h2>
|
||||||
|
{#if store.state.jwtinfo.userdetails.permissions.includes("RUNNER:GET")}
|
||||||
<a
|
<a
|
||||||
class:activenav={$router.path.includes("/runners/")}
|
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"
|
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