Merge branch 'master' into live
This commit is contained in:
commit
d2398fb962
@ -544,5 +544,5 @@ AuthTagRated: Korrektur ist bewertet
|
|||||||
AuthTagUserSubmissions: Abgaben erfolgen durch Kursteilnehmer
|
AuthTagUserSubmissions: Abgaben erfolgen durch Kursteilnehmer
|
||||||
AuthTagCorrectorSubmissions: Abgaben erfolgen durch Korrektoren
|
AuthTagCorrectorSubmissions: Abgaben erfolgen durch Korrektoren
|
||||||
AuthTagAuthentication: Authentifizierung erfüllt Anforderungen
|
AuthTagAuthentication: Authentifizierung erfüllt Anforderungen
|
||||||
AuthTagIsRead: Zugriff ist nur lesend
|
AuthTagRead: Zugriff ist nur lesend
|
||||||
AuthTagIsWrite: Zugriff ist i.A. schreibend
|
AuthTagWrite: Zugriff ist i.A. schreibend
|
||||||
12
routes
12
routes
@ -19,8 +19,8 @@
|
|||||||
--
|
--
|
||||||
-- !materials -- only if course allows all materials to be free (no meaning outside of courses)
|
-- !materials -- only if course allows all materials to be free (no meaning outside of courses)
|
||||||
-- !time -- access depends on time somehow
|
-- !time -- access depends on time somehow
|
||||||
-- !isRead -- only if it is read-only access (i.e. GET but not POST)
|
-- !read -- only if it is read-only access (i.e. GET but not POST)
|
||||||
-- !isWrite -- only if it is write access (i.e. POST only) why needed???
|
-- !write -- only if it is write access (i.e. POST only, included for completeness)
|
||||||
--
|
--
|
||||||
-- !deprecated -- like free, but logs and gives a warning; entirely disabled in production
|
-- !deprecated -- like free, but logs and gives a warning; entirely disabled in production
|
||||||
-- !development -- like free, but only for development builds
|
-- !development -- like free, but only for development builds
|
||||||
@ -78,11 +78,11 @@
|
|||||||
/subs SSubsR GET POST -- for lecturer only
|
/subs SSubsR GET POST -- for lecturer only
|
||||||
/subs/new SubmissionNewR GET POST !timeANDregisteredANDuser-submissions
|
/subs/new SubmissionNewR GET POST !timeANDregisteredANDuser-submissions
|
||||||
/subs/own SubmissionOwnR GET !free -- just redirect
|
/subs/own SubmissionOwnR GET !free -- just redirect
|
||||||
/sub/#CryptoFileNameSubmission SubmissionR !correctorANDisRead:
|
/sub/#CryptoFileNameSubmission SubmissionR !correctorANDread:
|
||||||
/ SubShowR GET POST !ownerANDtime !ownerANDisRead
|
/ SubShowR GET POST !ownerANDtime !ownerANDread
|
||||||
/archive/#{ZIPArchiveName SubmissionFileType} SubArchiveR GET !owner
|
/archive/#{ZIPArchiveName SubmissionFileType} SubArchiveR GET !owner
|
||||||
/assign SAssignR GET POST !lecturerANDtime
|
/assign SAssignR GET POST !lecturerANDtime
|
||||||
/correction CorrectionR GET POST !corrector !ownerANDisReadANDrated
|
/correction CorrectionR GET POST !corrector !ownerANDreadANDrated
|
||||||
!/#SubmissionFileType/*FilePath SubDownloadR GET !owner
|
!/#SubmissionFileType/*FilePath SubDownloadR GET !owner
|
||||||
/correctors SCorrR GET POST
|
/correctors SCorrR GET POST
|
||||||
/pseudonym SPseudonymR GET POST !registeredANDcorrector-submissions
|
/pseudonym SPseudonymR GET POST !registeredANDcorrector-submissions
|
||||||
@ -96,7 +96,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/msgs MessageListR GET POST
|
/msgs MessageListR GET POST
|
||||||
/msg/#{CryptoUUIDSystemMessage} MessageR GET POST !timeANDisReadANDauthentication
|
/msg/#{CryptoUUIDSystemMessage} MessageR GET POST !timeANDreadANDauthentication
|
||||||
|
|
||||||
|
|
||||||
!/#UUID CryptoUUIDDispatchR GET !free -- just redirect
|
!/#UUID CryptoUUIDDispatchR GET !free -- just redirect
|
||||||
|
|||||||
@ -518,8 +518,8 @@ tagAccessPredicate AuthAuthentication = APDB $ \route _ -> case route of
|
|||||||
guard $ not systemMessageAuthenticatedOnly || isAuthenticated
|
guard $ not systemMessageAuthenticatedOnly || isAuthenticated
|
||||||
return Authorized
|
return Authorized
|
||||||
r -> $unsupportedAuthPredicate "authentication" r
|
r -> $unsupportedAuthPredicate "authentication" r
|
||||||
tagAccessPredicate AuthIsRead = APHandler . const $ bool (return Authorized) (unauthorizedI MsgUnauthorizedWrite)
|
tagAccessPredicate AuthRead = APHandler . const $ bool (return Authorized) (unauthorizedI MsgUnauthorizedWrite)
|
||||||
tagAccessPredicate AuthIsWrite = APHandler . const $ bool (unauthorizedI MsgUnauthorized) (return Authorized)
|
tagAccessPredicate AuthWrite = APHandler . const $ bool (unauthorizedI MsgUnauthorized) (return Authorized)
|
||||||
|
|
||||||
|
|
||||||
newtype InvalidAuthTag = InvalidAuthTag Text
|
newtype InvalidAuthTag = InvalidAuthTag Text
|
||||||
|
|||||||
@ -660,8 +660,8 @@ data AuthTag
|
|||||||
| AuthUserSubmissions
|
| AuthUserSubmissions
|
||||||
| AuthCorrectorSubmissions
|
| AuthCorrectorSubmissions
|
||||||
| AuthAuthentication
|
| AuthAuthentication
|
||||||
| AuthIsRead
|
| AuthRead
|
||||||
| AuthIsWrite
|
| AuthWrite
|
||||||
deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic)
|
deriving (Eq, Ord, Enum, Bounded, Read, Show, Generic)
|
||||||
|
|
||||||
instance Universe AuthTag
|
instance Universe AuthTag
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user