fix: redirect to course list from course from if user is not moderator and instructor

This commit is contained in:
Jannat Patel
2025-04-10 16:36:22 +05:30
parent 04aff8d149
commit eeaa835bef
4 changed files with 31 additions and 175 deletions

View File

@@ -310,11 +310,7 @@ const course = reactive({
})
onMounted(() => {
if (
props.courseName == 'new' &&
!user.data?.is_moderator &&
!user.data?.is_instructor
) {
if (!user.data?.is_moderator && !user.data?.is_instructor) {
router.push({ name: 'Courses' })
}