fix: moderators should be able to access unpublished courses

This commit is contained in:
Jannat Patel
2025-10-14 19:27:45 +05:30
parent 27577edb16
commit 5cfa4f173a
2 changed files with 7 additions and 2 deletions

View File

@@ -144,7 +144,12 @@ watch(
)
watch(course, () => {
if (!isInstructor() && !course.data?.published && !course.data?.upcoming) {
if (
!isInstructor() &&
!user.data?.is_moderator &&
!course.data?.published &&
!course.data?.upcoming
) {
router.push({
name: 'Courses',
})