diff --git a/src/Handler/Course/Show.hs b/src/Handler/Course/Show.hs index 36ff17ece..a4256ec92 100644 --- a/src/Handler/Course/Show.hs +++ b/src/Handler/Course/Show.hs @@ -85,7 +85,9 @@ getCShowR tid ssh csh = do & over (mapped . _1) E.unValue & over (mapped . _2) E.unValue lastEditText <- formatTime SelFormatDateTime $ maybe id max (guardOn visible =<< courseNewsVisibleFrom) courseNewsLastEdit - return (cID, n, visible, files, lastEditText) + mayEdit <- hasWriteAccessTo $ CNewsR tid ssh csh cID CNEditR + mayDelete <- hasWriteAccessTo $ CNewsR tid ssh csh cID CNDeleteR + return (cID, n, visible, files, lastEditText, mayEdit, mayDelete) return (cid,course,schoolName,participants,registration,lecturers,assistants,correctors,tutors,mAllocation,hasApplicationTemplate,mApplication,news) mDereg <- traverse (formatTime SelFormatDateTime) $ courseDeregisterUntil course diff --git a/templates/course.hamlet b/templates/course.hamlet index c744a0ef9..92cbb2064 100644 --- a/templates/course.hamlet +++ b/templates/course.hamlet @@ -8,7 +8,7 @@ $newline never
_{MsgCourseNewsLastEdited lastEditText} -