diff --git a/src/Foundation.hs b/src/Foundation.hs index 12b96b733..4912f7e01 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -989,7 +989,7 @@ tagAccessPredicate AuthAllocationTime = APDB $ \mAuthId route _ -> case route of tagAccessPredicate AuthCourseTime = APDB $ \_mAuthId route _ -> case route of CourseR tid ssh csh _ -> maybeT (unauthorizedI MsgUnauthorizedCourseTime) $ do now <- liftIO getCurrentTime - Entity _cid course <- $cachedHereBinary (tid, ssh, csh) . MaybeT . getBy $ TermSchoolCourseShort tid ssh csh + Entity _cid course <- MaybeT . $cachedHereBinary (tid, ssh, csh) . getBy $ TermSchoolCourseShort tid ssh csh guard $ courseIsVisible' now course return Authorized r -> $unsupportedAuthPredicate AuthCourseTime r