Apply 1 suggestion(s) to 1 file(s)
This commit is contained in:
parent
3d35b69cfb
commit
5b4df3c6b1
@ -535,11 +535,7 @@ tagAccessPredicate AuthExamOffice = APDB $ \mAuthId route _ -> case route of
|
||||
return Authorized
|
||||
CourseR _ ssh _ _ -> $cachedHereBinary (mAuthId, ssh) . exceptT return return $ do
|
||||
authId <- maybeExceptT AuthenticationRequired $ return mAuthId
|
||||
isExamOffice <- lift $ exists
|
||||
[ UserFunctionUser ==. authId
|
||||
, UserFunctionFunction ==. SchoolExamOffice
|
||||
, UserFunctionSchool ==. ssh
|
||||
]
|
||||
isExamOffice <- lift . existsBy $ UniqueUserFunction authId ssh SchoolExamOffice
|
||||
guardMExceptT isExamOffice $ unauthorizedI MsgUnauthorizedExamExamOffice
|
||||
return Authorized
|
||||
_other -> $cachedHereBinary mAuthId . exceptT return return $ do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user