fix: fix build

This commit is contained in:
Gregor Kleen 2019-09-05 09:21:45 +02:00
parent 6d52ed5c4c
commit 1a66716e8a

View File

@ -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