Publish current project state
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { computed } from 'vue';
|
||||
import { useStoreGetters } from 'dashboard/composables/store';
|
||||
import { ROLE_ADMINISTRATOR } from 'dashboard/constants/permissions.js';
|
||||
|
||||
/**
|
||||
* Composable to determine if the current user is an administrator.
|
||||
@@ -9,7 +10,7 @@ export function useAdmin() {
|
||||
const getters = useStoreGetters();
|
||||
|
||||
const currentUserRole = computed(() => getters.getCurrentRole.value);
|
||||
const isAdmin = computed(() => currentUserRole.value === 'administrator');
|
||||
const isAdmin = computed(() => currentUserRole.value === ROLE_ADMINISTRATOR);
|
||||
|
||||
return {
|
||||
isAdmin,
|
||||
|
||||
Reference in New Issue
Block a user