From 1a66716e8afee4b1f34785e0743590ee0cab0830 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 5 Sep 2019 09:21:45 +0200 Subject: [PATCH] fix: fix build --- src/Handler/Course/Application/Edit.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Handler/Course/Application/Edit.hs b/src/Handler/Course/Application/Edit.hs index bd7615614..0ffa0f5b9 100644 --- a/src/Handler/Course/Application/Edit.hs +++ b/src/Handler/Course/Application/Edit.hs @@ -21,8 +21,10 @@ postCAEditR tid ssh csh cID = do return (mAlloc, course, app, appUser) isAdmin <- case mAlloc of - Just alloc -> hasWriteAccessTo $ SchoolR (alloc ^. _entityVal . _allocationSchool) SchoolEditR - Nothing -> hasWriteAccessTo $ SchoolR (course ^. _entityVal . _courseSchool ) SchoolEditR + Just (Entity _ Allocation{..}) + -> hasWriteAccessTo $ SchoolR allocationSchool SchoolEditR + Nothing + -> hasWriteAccessTo $ SchoolR courseSchool SchoolEditR afmLecturer <- hasWriteAccessTo $ CourseR courseTerm courseSchool courseShorthand CEditR afmApplicantEdit <- hasWriteAccessTo $ CApplicationR tid ssh csh cID CAEditR -- TODO: Wrong. courseCID <- encrypt cid :: Handler CryptoUUIDCourse