implemented permission system
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
import { page } from '$app/stores';
|
||||
import { t } from 'svelte-i18n';
|
||||
import { writable } from 'svelte/store';
|
||||
import { PERMISSIONS } from '$lib/utils/constants';
|
||||
import { hasPrivilige } from '$lib/utils/helpers';
|
||||
|
||||
let isMobileMenuOpen = false;
|
||||
|
||||
@@ -104,7 +106,7 @@
|
||||
{$page.data.user.last_name}
|
||||
</a>
|
||||
</div>
|
||||
{#if $page.data.user.role_id > 0}
|
||||
{#if hasPrivilige($page.data.user, PERMISSIONS.View)}
|
||||
<div
|
||||
class="header-nav-item"
|
||||
class:active={$page.url.pathname.startsWith(`${base}/auth/admin/users`)}
|
||||
|
||||
Reference in New Issue
Block a user