Forgotten minor bugfixes that belong to master, but slipped into this branch.
This commit is contained in:
parent
272bc7f6c5
commit
9bad1b42ec
@ -188,7 +188,7 @@ isAuthorizedDB (CourseEditExistR t c) _ = courseLecturerAccess . entityKey =<< g
|
|||||||
isAuthorizedDB (CourseEditExistIDR cID) _ = do
|
isAuthorizedDB (CourseEditExistIDR cID) _ = do
|
||||||
courseId <- decrypt cID
|
courseId <- decrypt cID
|
||||||
courseLecturerAccess courseId
|
courseLecturerAccess courseId
|
||||||
isAuthorizedDB route isWrite = return $ Unauthorized "No access to this route." -- Calling isAuthorized here creates infinite loop!
|
isAuthorizedDB _route _isWrite = return $ Unauthorized "No access to this route." -- Calling isAuthorized here creates infinite loop!
|
||||||
|
|
||||||
submissionAccess :: Either CryptoFileNameSubmission CryptoUUIDSubmission -> YesodDB UniWorX AuthResult
|
submissionAccess :: Either CryptoFileNameSubmission CryptoUUIDSubmission -> YesodDB UniWorX AuthResult
|
||||||
submissionAccess cID = do
|
submissionAccess cID = do
|
||||||
@ -384,7 +384,7 @@ instance YesodAuth UniWorX where
|
|||||||
authHttpManager = getHttpManager
|
authHttpManager = getHttpManager
|
||||||
|
|
||||||
ldapConfig :: UniWorX -> LDAPConfig
|
ldapConfig :: UniWorX -> LDAPConfig
|
||||||
ldapConfig app@(appSettings -> settings) = LDAPConfig
|
ldapConfig _app@(appSettings -> settings) = LDAPConfig
|
||||||
{ usernameFilter = \u -> principalName <> "=" <> u
|
{ usernameFilter = \u -> principalName <> "=" <> u
|
||||||
, identifierModifier
|
, identifierModifier
|
||||||
, ldapUri = appLDAPURI settings
|
, ldapUri = appLDAPURI settings
|
||||||
|
|||||||
@ -28,7 +28,11 @@ import Handler.Utils
|
|||||||
|
|
||||||
|
|
||||||
getSheetListR :: TermIdentifier -> Text -> Handler Html
|
getSheetListR :: TermIdentifier -> Text -> Handler Html
|
||||||
getSheetListR _ _ = defaultLayout [whamlet| Under Construction !!! |] -- TODO
|
getSheetListR tid csh = do
|
||||||
|
-- mbAid <- maybeAuthId
|
||||||
|
-- _ <- runDB $ do
|
||||||
|
-- courseEnt@(Entity cid course) <- getBy404 $ CourseTermShort (TermKey tid) csh
|
||||||
|
defaultLayout [whamlet| Under Construction !!! |] -- TODO
|
||||||
|
|
||||||
getSheetNewR :: TermIdentifier -> Text -> Handler Html
|
getSheetNewR :: TermIdentifier -> Text -> Handler Html
|
||||||
getSheetNewR _ _ = defaultLayout [whamlet| Under Construction !!! |] -- TODO
|
getSheetNewR _ _ = defaultLayout [whamlet| Under Construction !!! |] -- TODO
|
||||||
|
|||||||
@ -109,7 +109,7 @@ sinkSubmission sheetId userId mExists = do
|
|||||||
| not (null collidingFiles) = any (/~ file) [ f | (Entity _ f, _) <- collidingFiles ]
|
| not (null collidingFiles) = any (/~ file) [ f | (Entity _ f, _) <- collidingFiles ]
|
||||||
| otherwise = True
|
| otherwise = True
|
||||||
matchesUnderlying
|
matchesUnderlying
|
||||||
| not (null underlyingFiles) = all (~~ file) [ f | (Entity _ f, Entity _ sf) <- underlyingFiles ]
|
| not (null underlyingFiles) = all (~~ file) [ f | (Entity _ f, Entity _ _sf) <- underlyingFiles ]
|
||||||
| otherwise = False
|
| otherwise = False
|
||||||
undoneDeletion = any submissionFileIsDeletion [ sf | (_, Entity _ sf) <- collidingFiles ]
|
undoneDeletion = any submissionFileIsDeletion [ sf | (_, Entity _ sf) <- collidingFiles ]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user