diff --git a/src/Foundation.hs b/src/Foundation.hs index 8c527c9b1..a0f2aeebe 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -715,8 +715,8 @@ tagAccessPredicate AuthTime = APDB $ \mAuthId route _ -> case route of E.where_ . E.exists . E.from $ \tutorialParticipant -> E.where_ $ tutorialParticipant E.^. TutorialParticipantTutorial E.==. tutorial E.^. TutorialId E.&&. tutorialParticipant E.^. TutorialParticipantUser E.==. E.val uid - E.where_ $ tutorial E.^. TutorialCourse E.==. E.val cid - return $ (tutorial E.^. TutorialRegisterFrom, tutorial E.^. TutorialDeregisterUntil) + E.where_ $ tutorial E.^. TutorialCourse E.==. E.val cid + return $ tutorial E.^. TutorialDeregisterUntil forM_ tutorials $ \(E.Value deregUntil) -> guard $ NTop (Just now) <= NTop deregUntil return Authorized