From 87a7a2172b57b5fa1da06bec48778dd4e1372f23 Mon Sep 17 00:00:00 2001 From: YiranDuan721 Date: Sun, 24 Mar 2024 23:53:24 +0100 Subject: [PATCH] No authorization in liveStreams(), as is expected in the tests. This does not affect the result, private live streams are not listed for students. --- api/stream.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/api/stream.go b/api/stream.go index 821a86c7a..0238b2f7c 100644 --- a/api/stream.go +++ b/api/stream.go @@ -206,8 +206,6 @@ func (r streamRoutes) getSubtitles(c *gin.Context) { // livestreams returns all streams that are live func (r streamRoutes) liveStreams(c *gin.Context) { - tumLiveContext := c.MustGet("TUMLiveContext").(tools.TUMLiveContext) - var res []liveStreamDto streams, err := r.StreamsDao.GetCurrentLive(c) if err != nil { @@ -219,17 +217,11 @@ func (r streamRoutes) liveStreams(c *gin.Context) { }) return } - - user := tumLiveContext.User for _, s := range streams { course, err := r.CoursesDao.GetCourseById(c, s.CourseID) if err != nil { logger.Error("Error fetching course", "err", err) } - // Don't include private stream for non course admins - if s.Private && (user == nil || !user.IsAdminOfCourse(course)) { - continue - } lectureHall := "Selfstream" if s.LectureHallID != 0 { l, err := r.LectureHallsDao.GetLectureHallByID(s.LectureHallID)