diff --git a/api/courses.go b/api/courses.go index f8c7f924d..4b2c6c4a9 100644 --- a/api/courses.go +++ b/api/courses.go @@ -362,6 +362,7 @@ func (r coursesRoutes) getCourseBySlug(c *gin.Context) { if (course.IsLoggedIn() && tumLiveContext.User == nil) || (course.IsEnrolled() && !tumLiveContext.User.IsEligibleToWatchCourse(course)) { c.AbortWithStatus(http.StatusUnauthorized) + return } user := tumLiveContext.User