diff --git a/apps/dashboard/src/lib/components/RoleBasedSecurity/index.svelte b/apps/dashboard/src/lib/components/RoleBasedSecurity/index.svelte index 3d2c5dda..3b0c5045 100644 --- a/apps/dashboard/src/lib/components/RoleBasedSecurity/index.svelte +++ b/apps/dashboard/src/lib/components/RoleBasedSecurity/index.svelte @@ -2,6 +2,7 @@ import { profile } from '$lib/utils/store/user'; import { group } from '../Course/store'; import type { GroupPerson } from '$lib/utils/types'; + import { isOrgAdmin } from '$lib/utils/store/org'; export let allowedRoles: number[] = []; export let onDenied = () => {}; @@ -13,7 +14,7 @@ userRole = user ? user.role_id : userRole; - if ($group.people.length && !allowedRoles.includes(userRole)) { + if (!$isOrgAdmin && $group.people.length && !allowedRoles.includes(userRole)) { onDenied(); } }