fix: org improvements (#385)

* fix: verify newly added admins

* allow adding of admins for paid customers

* feat: permit admins to see all courses
This commit is contained in:
Rotimi Best
2024-07-08 06:45:26 +01:00
committed by GitHub
parent ae2fe71353
commit b60b45ed26
3 changed files with 11 additions and 9 deletions
@@ -14,6 +14,7 @@
import Modal from '$lib/components/Modal/index.svelte';
import { t } from '$lib/utils/functions/translations';
import PrimaryButton from '$lib/components/PrimaryButton/index.svelte';
import { isOrgAdmin } from '$lib/utils/store/org';
export let courseId = '';
export let path = '';
@@ -56,7 +57,7 @@
$globalStore.isStudent = user.role_id === 3;
filterPollsByStatus($globalStore.isStudent);
} else if ($profile.id && $group.people.length) {
} else if (!$isOrgAdmin && $profile.id && $group.people.length) {
// Current User doesn't have permission to view
isPermitted = false;
}