fix(authorization): have AllocationTime consider ParticipantState
This commit is contained in:
parent
cbb7ec53ad
commit
b69481e88f
@ -784,7 +784,7 @@ tagAccessPredicate AuthAllocationTime = APDB $ \mAuthId route _ -> case route of
|
||||
Nothing -> return Authorized
|
||||
Just (cid, Allocation{..}) -> do
|
||||
registered <- case mAuthId of
|
||||
Just uid -> $cachedHereBinary (uid, cid) . existsBy $ UniqueParticipant uid cid
|
||||
Just uid -> $cachedHereBinary (uid, cid) $ exists [ CourseParticipantUser ==. uid, CourseParticipantCourse ==. cid, CourseParticipantState ==. CourseParticipantActive ]
|
||||
_ -> return False
|
||||
if
|
||||
| not registered
|
||||
|
||||
Loading…
Reference in New Issue
Block a user