chore(legal): redirect legal to external fraport urls
This commit is contained in:
parent
00dc0be032
commit
0d9c2963d5
@ -32,6 +32,18 @@ mail-support:
|
|||||||
email: "_env:MAILSUPPORT:uni2work@ifi.lmu.de"
|
email: "_env:MAILSUPPORT:uni2work@ifi.lmu.de"
|
||||||
mail-retain-sent: 31470547
|
mail-retain-sent: 31470547
|
||||||
|
|
||||||
|
legal-external:
|
||||||
|
- language: "en"
|
||||||
|
imprint: "https://www.fraport.com/en/tools/imprint.html"
|
||||||
|
data-protection: "https://www.fraport.com/en/our-group/data-protection-statement.html"
|
||||||
|
terms-of-use: "https://www.fraport.com/en/tools/legal-information.html"
|
||||||
|
payments: "https://www.fraport.com/de/geschaeftsfelder/service/geschaeftspartner/richtlinien-und-zahlungsbedingungen.html"
|
||||||
|
- language: "de"
|
||||||
|
imprint: "https://www.fraport.com/de/tools/impressum.html"
|
||||||
|
data-protection: "https://www.fraport.com/de/konzern/datenschutz.html"
|
||||||
|
terms-of-use: "https://www.fraport.com/de/tools/disclaimer.html"
|
||||||
|
payments: "https://www.fraport.com/de/geschaeftsfelder/service/geschaeftspartner/richtlinien-und-zahlungsbedingungen.html"
|
||||||
|
|
||||||
job-workers: "_env:JOB_WORKERS:10"
|
job-workers: "_env:JOB_WORKERS:10"
|
||||||
job-flush-interval: "_env:JOB_FLUSH:30"
|
job-flush-interval: "_env:JOB_FLUSH:30"
|
||||||
job-cron-interval: "_env:CRON_INTERVAL:60"
|
job-cron-interval: "_env:CRON_INTERVAL:60"
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
HeadingLegal: Rechtliche Informationen
|
HeadingLegal: Rechtliche Informationen
|
||||||
|
InfoSupervisorTitle: Hinweise für Ansprechpartner
|
||||||
InfoLecturerTitle: Hinweise für Veranstalter:innen
|
InfoLecturerTitle: Hinweise für Veranstalter:innen
|
||||||
InfoLecturerCourses: Veranstaltungen
|
InfoLecturerCourses: Veranstaltungen
|
||||||
InfoLecturerExercises: Übungsbetrieb
|
InfoLecturerExercises: Übungsbetrieb
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
HeadingLegal: Legal
|
HeadingLegal: Legal
|
||||||
|
InfoSupervisorTitle: Information for Supervisors
|
||||||
InfoLecturerTitle: Information for lecturers
|
InfoLecturerTitle: Information for lecturers
|
||||||
InfoLecturerCourses: Courses
|
InfoLecturerCourses: Courses
|
||||||
InfoLecturerExercises: Course Exercises
|
InfoLecturerExercises: Course Exercises
|
||||||
|
|||||||
@ -21,6 +21,7 @@ MenuDataProt: Datenschutzerklärung
|
|||||||
MenuTermsUse: Nutzungsbedingungen
|
MenuTermsUse: Nutzungsbedingungen
|
||||||
MenuCopyright: Urheberrecht
|
MenuCopyright: Urheberrecht
|
||||||
MenuImprint: Impressum
|
MenuImprint: Impressum
|
||||||
|
MenuPayments: Zahlungsbedingungen
|
||||||
|
|
||||||
MenuInstance: Instanz-Identifikation
|
MenuInstance: Instanz-Identifikation
|
||||||
MenuHealth: Instanz-Zustand
|
MenuHealth: Instanz-Zustand
|
||||||
|
|||||||
@ -21,6 +21,7 @@ MenuDataProt: Data protection
|
|||||||
MenuTermsUse: Terms of use
|
MenuTermsUse: Terms of use
|
||||||
MenuCopyright: Copyright
|
MenuCopyright: Copyright
|
||||||
MenuImprint: Imprint
|
MenuImprint: Imprint
|
||||||
|
MenuPayments: Payment Terms
|
||||||
|
|
||||||
MenuInstance: Instance identification
|
MenuInstance: Instance identification
|
||||||
MenuHealth: Instance health
|
MenuHealth: Instance health
|
||||||
|
|||||||
5
routes
5
routes
@ -78,10 +78,15 @@
|
|||||||
/instance InstanceR GET !free
|
/instance InstanceR GET !free
|
||||||
/info InfoR GET !free
|
/info InfoR GET !free
|
||||||
/info/lecturer InfoLecturerR GET !free
|
/info/lecturer InfoLecturerR GET !free
|
||||||
|
/info/supervisor InfoSupervisorR GET !free
|
||||||
/info/legal LegalR GET !free
|
/info/legal LegalR GET !free
|
||||||
/info/allocation InfoAllocationR GET !free
|
/info/allocation InfoAllocationR GET !free
|
||||||
/info/glossary GlossaryR GET !free
|
/info/glossary GlossaryR GET !free
|
||||||
/info/faq FaqR GET !free
|
/info/faq FaqR GET !free
|
||||||
|
/info/terms-of-use TermsOfUseR GET !free
|
||||||
|
/info/payments PaymentsR GET !free
|
||||||
|
/imprint ImprintR GET !free
|
||||||
|
/data-protection DataProtectionR GET !free
|
||||||
/version VersionR GET !free
|
/version VersionR GET !free
|
||||||
/status StatusR GET !free
|
/status StatusR GET !free
|
||||||
|
|
||||||
|
|||||||
@ -370,6 +370,8 @@ makeFoundation appSettings''@AppSettings{..} = do
|
|||||||
}
|
}
|
||||||
return . Just $ mkAvsQuery avsServer avsAuth avsEnv
|
return . Just $ mkAvsQuery avsServer avsAuth avsEnv
|
||||||
|
|
||||||
|
when (null appLegalExternal) $ $logErrorS "Legal" "Configuration of external legal links is missing."
|
||||||
|
|
||||||
$logDebugS "Runtime configuration" $ tshowCrop appSettings'
|
$logDebugS "Runtime configuration" $ tshowCrop appSettings'
|
||||||
|
|
||||||
let foundation = mkFoundation appSettings' sqlPool smtpPool ldapPool appCryptoIDKey appSessionStore appSecretBoxKey appWidgetMemcached appJSONWebKeySet appClusterID appMemcached appMemcachedLocal appUploadCache appVerpSecret appAuthKey appPersonalisedSheetFilesSeedKey appVolatileClusterSettingsCache appAvsQuery
|
let foundation = mkFoundation appSettings' sqlPool smtpPool ldapPool appCryptoIDKey appSessionStore appSecretBoxKey appWidgetMemcached appJSONWebKeySet appClusterID appMemcached appMemcachedLocal appUploadCache appVerpSecret appAuthKey appPersonalisedSheetFilesSeedKey appVolatileClusterSettingsCache appAvsQuery
|
||||||
|
|||||||
@ -47,7 +47,7 @@ import Yesod.Core.Types (HandlerContents)
|
|||||||
|
|
||||||
|
|
||||||
type Breadcrumb = (Text, Maybe (Route UniWorX))
|
type Breadcrumb = (Text, Maybe (Route UniWorX))
|
||||||
|
|
||||||
-- Define breadcrumbs.
|
-- Define breadcrumbs.
|
||||||
i18nCrumb :: forall msg m.
|
i18nCrumb :: forall msg m.
|
||||||
(RenderMessage UniWorX msg, MonadHandler m, HandlerSite m ~ UniWorX)
|
(RenderMessage UniWorX msg, MonadHandler m, HandlerSite m ~ UniWorX)
|
||||||
@ -117,7 +117,7 @@ breadcrumb AdminLdapR = i18nCrumb MsgMenuLdap $ Just AdminR
|
|||||||
|
|
||||||
breadcrumb PrintCenterR = i18nCrumb MsgMenuApc Nothing
|
breadcrumb PrintCenterR = i18nCrumb MsgMenuApc Nothing
|
||||||
breadcrumb PrintSendR = i18nCrumb MsgMenuPrintSend $ Just PrintCenterR
|
breadcrumb PrintSendR = i18nCrumb MsgMenuPrintSend $ Just PrintCenterR
|
||||||
breadcrumb PrintDownloadR{} = i18nCrumb MsgMenuPrintDownload $ Just PrintCenterR
|
breadcrumb PrintDownloadR{} = i18nCrumb MsgMenuPrintDownload $ Just PrintCenterR
|
||||||
breadcrumb PrintAckR{} = i18nCrumb MsgMenuPrintSend $ Just PrintCenterR -- never displayed
|
breadcrumb PrintAckR{} = i18nCrumb MsgMenuPrintSend $ Just PrintCenterR -- never displayed
|
||||||
breadcrumb PrintAckDirectR{}= i18nCrumb MsgMenuPrintSend $ Just PrintCenterR -- never displayed
|
breadcrumb PrintAckDirectR{}= i18nCrumb MsgMenuPrintSend $ Just PrintCenterR -- never displayed
|
||||||
|
|
||||||
@ -134,12 +134,18 @@ breadcrumb (ExamOfficeR EOFieldsR) = i18nCrumb MsgMenuExamOfficeFields . Just $
|
|||||||
breadcrumb (ExamOfficeR EOUsersR) = i18nCrumb MsgMenuExamOfficeUsers . Just $ ExamOfficeR EOExamsR
|
breadcrumb (ExamOfficeR EOUsersR) = i18nCrumb MsgMenuExamOfficeUsers . Just $ ExamOfficeR EOExamsR
|
||||||
breadcrumb (ExamOfficeR EOUsersInviteR) = i18nCrumb MsgBreadcrumbExamOfficeUserInvite Nothing
|
breadcrumb (ExamOfficeR EOUsersInviteR) = i18nCrumb MsgBreadcrumbExamOfficeUserInvite Nothing
|
||||||
|
|
||||||
breadcrumb InfoR = i18nCrumb MsgMenuInformation Nothing
|
breadcrumb InfoR = i18nCrumb MsgMenuInformation Nothing
|
||||||
breadcrumb InfoLecturerR = i18nCrumb MsgInfoLecturerTitle $ Just InfoR
|
breadcrumb InfoLecturerR = i18nCrumb MsgInfoLecturerTitle $ Just InfoR
|
||||||
breadcrumb LegalR = i18nCrumb MsgMenuLegal $ Just InfoR
|
breadcrumb InfoSupervisorR = i18nCrumb MsgInfoSupervisorTitle $ Just InfoR
|
||||||
|
breadcrumb LegalR = i18nCrumb MsgMenuLegal $ Just InfoR
|
||||||
|
breadcrumb ImprintR = i18nCrumb MsgMenuImprint $ Just LegalR
|
||||||
|
breadcrumb DataProtectionR = i18nCrumb MsgMenuDataProt $ Just LegalR
|
||||||
|
breadcrumb TermsOfUseR = i18nCrumb MsgMenuTermsUse $ Just LegalR
|
||||||
|
breadcrumb PaymentsR = i18nCrumb MsgMenuPayments $ Just LegalR
|
||||||
|
|
||||||
breadcrumb InfoAllocationR = i18nCrumb MsgBreadcrumbAllocationInfo $ Just InfoR
|
breadcrumb InfoAllocationR = i18nCrumb MsgBreadcrumbAllocationInfo $ Just InfoR
|
||||||
breadcrumb VersionR = i18nCrumb MsgMenuVersion $ Just InfoR
|
breadcrumb VersionR = i18nCrumb MsgMenuVersion $ Just InfoR
|
||||||
breadcrumb FaqR = i18nCrumb MsgBreadcrumbFaq $ Just InfoR
|
breadcrumb FaqR = i18nCrumb MsgBreadcrumbFaq $ Just InfoR
|
||||||
|
|
||||||
|
|
||||||
breadcrumb HelpR = i18nCrumb MsgMenuHelp Nothing
|
breadcrumb HelpR = i18nCrumb MsgMenuHelp Nothing
|
||||||
@ -150,21 +156,21 @@ breadcrumb InstanceR = i18nCrumb MsgMenuInstance Nothing
|
|||||||
breadcrumb StatusR = i18nCrumb MsgMenuHealth Nothing -- never displayed
|
breadcrumb StatusR = i18nCrumb MsgMenuHealth Nothing -- never displayed
|
||||||
|
|
||||||
breadcrumb QualificationAllR = i18nCrumb MsgMenuQualifications Nothing
|
breadcrumb QualificationAllR = i18nCrumb MsgMenuQualifications Nothing
|
||||||
breadcrumb (QualificationSchoolR ssh ) = useRunDB . maybeT (i18nCrumb MsgBreadcrumbSchool . Just $ SchoolListR) $ do -- redirect only, used in other breadcrumbs
|
breadcrumb (QualificationSchoolR ssh ) = useRunDB . maybeT (i18nCrumb MsgBreadcrumbSchool . Just $ SchoolListR) $ do -- redirect only, used in other breadcrumbs
|
||||||
guardM . lift . existsBy . UniqueSchoolShorthand $ unSchoolKey ssh
|
guardM . lift . existsBy . UniqueSchoolShorthand $ unSchoolKey ssh
|
||||||
return (CI.original $ unSchoolKey ssh, Just QualificationAllR)
|
return (CI.original $ unSchoolKey ssh, Just QualificationAllR)
|
||||||
breadcrumb (QualificationR ssh qsh) =useRunDB . maybeT (i18nCrumb MsgBreadcrumbCourse . Just $ QualificationSchoolR ssh) $ do
|
breadcrumb (QualificationR ssh qsh) =useRunDB . maybeT (i18nCrumb MsgBreadcrumbCourse . Just $ QualificationSchoolR ssh) $ do
|
||||||
guardM . lift . existsBy $ SchoolQualificationShort ssh qsh
|
guardM . lift . existsBy $ SchoolQualificationShort ssh qsh
|
||||||
return (CI.original qsh, Just $ QualificationSchoolR ssh)
|
return (CI.original qsh, Just $ QualificationSchoolR ssh)
|
||||||
|
|
||||||
breadcrumb LmsAllR = i18nCrumb MsgMenuLms Nothing
|
breadcrumb LmsAllR = i18nCrumb MsgMenuLms Nothing
|
||||||
breadcrumb (LmsSchoolR ssh ) = useRunDB . maybeT (i18nCrumb MsgBreadcrumbSchool . Just $ SchoolListR) $ do -- redirect only, used in other breadcrumbs
|
breadcrumb (LmsSchoolR ssh ) = useRunDB . maybeT (i18nCrumb MsgBreadcrumbSchool . Just $ SchoolListR) $ do -- redirect only, used in other breadcrumbs
|
||||||
guardM . lift . existsBy . UniqueSchoolShorthand $ unSchoolKey ssh
|
guardM . lift . existsBy . UniqueSchoolShorthand $ unSchoolKey ssh
|
||||||
return (CI.original $ unSchoolKey ssh, Just LmsAllR)
|
return (CI.original $ unSchoolKey ssh, Just LmsAllR)
|
||||||
breadcrumb (LmsR ssh qsh) =useRunDB . maybeT (i18nCrumb MsgBreadcrumbCourse . Just $ LmsSchoolR ssh) $ do
|
breadcrumb (LmsR ssh qsh) =useRunDB . maybeT (i18nCrumb MsgBreadcrumbCourse . Just $ LmsSchoolR ssh) $ do
|
||||||
guardM . lift . existsBy $ SchoolQualificationShort ssh qsh
|
guardM . lift . existsBy $ SchoolQualificationShort ssh qsh
|
||||||
return (CI.original qsh, Just $ LmsSchoolR ssh)
|
return (CI.original qsh, Just $ LmsSchoolR ssh)
|
||||||
breadcrumb (LmsEditR ssh qsh) = i18nCrumb MsgMenuLmsEdit $ Just $ LmsR ssh qsh
|
breadcrumb (LmsEditR ssh qsh) = i18nCrumb MsgMenuLmsEdit $ Just $ LmsR ssh qsh
|
||||||
breadcrumb (LmsUsersR ssh qsh) = i18nCrumb MsgMenuLmsUsers $ Just $ LmsR ssh qsh
|
breadcrumb (LmsUsersR ssh qsh) = i18nCrumb MsgMenuLmsUsers $ Just $ LmsR ssh qsh
|
||||||
breadcrumb (LmsUsersDirectR ssh qsh) = i18nCrumb MsgMenuLmsUsers $ Just $ LmsUsersR ssh qsh -- never displayed, TypedContent
|
breadcrumb (LmsUsersDirectR ssh qsh) = i18nCrumb MsgMenuLmsUsers $ Just $ LmsUsersR ssh qsh -- never displayed, TypedContent
|
||||||
breadcrumb (LmsUserlistR ssh qsh) = i18nCrumb MsgMenuLmsUserlist $ Just $ LmsR ssh qsh
|
breadcrumb (LmsUserlistR ssh qsh) = i18nCrumb MsgMenuLmsUserlist $ Just $ LmsR ssh qsh
|
||||||
@ -541,7 +547,7 @@ navLinkAccess NavLink{..} = case navAccess' of
|
|||||||
authCtx <- getAuthContext
|
authCtx <- getAuthContext
|
||||||
memcachedBy (Just . Right $ 2 * diffMinute) (NavCacheRouteAccess authCtx nt route) . useRunDB $
|
memcachedBy (Just . Right $ 2 * diffMinute) (NavCacheRouteAccess authCtx nt route) . useRunDB $
|
||||||
bool hasWriteAccessTo hasReadAccessTo (is _NavTypeLink nt) route
|
bool hasWriteAccessTo hasReadAccessTo (is _NavTypeLink nt) route
|
||||||
|
|
||||||
defaultLinks :: ( MonadHandler m
|
defaultLinks :: ( MonadHandler m
|
||||||
, HandlerSite m ~ UniWorX
|
, HandlerSite m ~ UniWorX
|
||||||
-- , MonadThrow m
|
-- , MonadThrow m
|
||||||
@ -627,17 +633,17 @@ defaultLinks = fmap catMaybes . mapM runMaybeT $ -- Define the menu items of the
|
|||||||
}
|
}
|
||||||
, return $ NavFooter NavLink
|
, return $ NavFooter NavLink
|
||||||
{ navLabel = MsgMenuDataProt
|
{ navLabel = MsgMenuDataProt
|
||||||
, navRoute = LegalR :#: ("data-protection" :: Text)
|
, navRoute = DataProtectionR
|
||||||
, navAccess' = NavAccessTrue
|
, navAccess' = NavAccessTrue
|
||||||
, navType = NavTypeLink { navModal = False }
|
, navType = NavTypeLink { navModal = True }
|
||||||
, navQuick' = mempty
|
, navQuick' = mempty
|
||||||
, navForceActive = False
|
, navForceActive = False
|
||||||
}
|
}
|
||||||
, return $ NavFooter NavLink
|
, return $ NavFooter NavLink
|
||||||
{ navLabel = MsgMenuTermsUse
|
{ navLabel = MsgMenuTermsUse
|
||||||
, navRoute = LegalR :#: ("terms-of-use" :: Text)
|
, navRoute = TermsOfUseR
|
||||||
, navAccess' = NavAccessTrue
|
, navAccess' = NavAccessTrue
|
||||||
, navType = NavTypeLink { navModal = False }
|
, navType = NavTypeLink { navModal = True }
|
||||||
, navQuick' = mempty
|
, navQuick' = mempty
|
||||||
, navForceActive = False
|
, navForceActive = False
|
||||||
}
|
}
|
||||||
@ -651,9 +657,9 @@ defaultLinks = fmap catMaybes . mapM runMaybeT $ -- Define the menu items of the
|
|||||||
}
|
}
|
||||||
, return $ NavFooter NavLink
|
, return $ NavFooter NavLink
|
||||||
{ navLabel = MsgMenuImprint
|
{ navLabel = MsgMenuImprint
|
||||||
, navRoute = LegalR :#: ("imprint" :: Text)
|
, navRoute = ImprintR
|
||||||
, navAccess' = NavAccessTrue
|
, navAccess' = NavAccessTrue
|
||||||
, navType = NavTypeLink { navModal = False }
|
, navType = NavTypeLink { navModal = True }
|
||||||
, navQuick' = mempty
|
, navQuick' = mempty
|
||||||
, navForceActive = False
|
, navForceActive = False
|
||||||
}
|
}
|
||||||
@ -760,7 +766,7 @@ defaultLinks = fmap catMaybes . mapM runMaybeT $ -- Define the menu items of the
|
|||||||
, navQuick' = mempty
|
, navQuick' = mempty
|
||||||
, navForceActive = False
|
, navForceActive = False
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
, return NavHeaderContainer
|
, return NavHeaderContainer
|
||||||
{ navHeaderRole = NavHeaderPrimary
|
{ navHeaderRole = NavHeaderPrimary
|
||||||
, navLabel = SomeMessage MsgMenuAdminHeading
|
, navLabel = SomeMessage MsgMenuAdminHeading
|
||||||
@ -837,7 +843,7 @@ defaultLinks = fmap catMaybes . mapM runMaybeT $ -- Define the menu items of the
|
|||||||
, navType = NavTypeLink { navModal = False }
|
, navType = NavTypeLink { navModal = False }
|
||||||
, navQuick' = mempty
|
, navQuick' = mempty
|
||||||
, navForceActive = False
|
, navForceActive = False
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
, return NavHeaderContainer
|
, return NavHeaderContainer
|
||||||
@ -2019,7 +2025,7 @@ pageActions (CSheetR tid ssh csh shn SShowR) = do
|
|||||||
{ navLink = NavLink
|
{ navLink = NavLink
|
||||||
{ navLabel = MsgMenuSheetPersonalisedFiles
|
{ navLabel = MsgMenuSheetPersonalisedFiles
|
||||||
, navRoute = CSheetR tid ssh csh shn SPersonalFilesR
|
, navRoute = CSheetR tid ssh csh shn SPersonalFilesR
|
||||||
, navAccess' = NavAccessDB $
|
, navAccess' = NavAccessDB $
|
||||||
let onlyPersonalised = fmap (maybe False $ not . E.unValue) . E.selectMaybe . E.from $ \(sheet `E.InnerJoin` course) -> do
|
let onlyPersonalised = fmap (maybe False $ not . E.unValue) . E.selectMaybe . E.from $ \(sheet `E.InnerJoin` course) -> do
|
||||||
E.on $ sheet E.^. SheetCourse E.==. course E.^. CourseId
|
E.on $ sheet E.^. SheetCourse E.==. course E.^. CourseId
|
||||||
E.where_$ sheet E.^. SheetName E.==. E.val shn
|
E.where_$ sheet E.^. SheetName E.==. E.val shn
|
||||||
@ -2078,7 +2084,7 @@ pageActions (CSheetR tid ssh csh shn SSubsR) = return
|
|||||||
{ navLink = NavLink
|
{ navLink = NavLink
|
||||||
{ navLabel = MsgMenuSubmissionNew
|
{ navLabel = MsgMenuSubmissionNew
|
||||||
, navRoute = CSheetR tid ssh csh shn SubmissionNewR
|
, navRoute = CSheetR tid ssh csh shn SubmissionNewR
|
||||||
, navAccess' = NavAccessDB $
|
, navAccess' = NavAccessDB $
|
||||||
let submissionAccess = hasWriteAccessTo $ CSheetR tid ssh csh shn SSubsR
|
let submissionAccess = hasWriteAccessTo $ CSheetR tid ssh csh shn SSubsR
|
||||||
hasNoSubmission = maybeT (return False) $ do
|
hasNoSubmission = maybeT (return False) $ do
|
||||||
uid <- MaybeT $ liftHandler maybeAuthId
|
uid <- MaybeT $ liftHandler maybeAuthId
|
||||||
@ -2479,31 +2485,31 @@ pageActions ParticipantsListR = return
|
|||||||
, navChildren = []
|
, navChildren = []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
pageActions (LmsR sid qsh) = return
|
pageActions (LmsR sid qsh) = return
|
||||||
[ NavPageActionPrimary
|
[ NavPageActionPrimary
|
||||||
{ navLink = defNavLink MsgMenuLmsUsers $ LmsUsersR sid qsh
|
{ navLink = defNavLink MsgMenuLmsUsers $ LmsUsersR sid qsh
|
||||||
, navChildren =
|
, navChildren =
|
||||||
[ defNavLink MsgMenuLmsDirectDownload $ LmsUsersDirectR sid qsh
|
[ defNavLink MsgMenuLmsDirectDownload $ LmsUsersDirectR sid qsh
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
, NavPageActionPrimary
|
, NavPageActionPrimary
|
||||||
{ navLink = defNavLink MsgMenuLmsUserlist $ LmsUserlistR sid qsh
|
{ navLink = defNavLink MsgMenuLmsUserlist $ LmsUserlistR sid qsh
|
||||||
, navChildren =
|
, navChildren =
|
||||||
[ defNavLink MsgMenuLmsUpload $ LmsUserlistUploadR sid qsh
|
[ defNavLink MsgMenuLmsUpload $ LmsUserlistUploadR sid qsh
|
||||||
, defNavLink MsgMenuLmsDirectUpload $ LmsUserlistDirectR sid qsh
|
, defNavLink MsgMenuLmsDirectUpload $ LmsUserlistDirectR sid qsh
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
, NavPageActionPrimary
|
, NavPageActionPrimary
|
||||||
{ navLink = defNavLink MsgMenuLmsResult $ LmsResultR sid qsh
|
{ navLink = defNavLink MsgMenuLmsResult $ LmsResultR sid qsh
|
||||||
, navChildren =
|
, navChildren =
|
||||||
[ defNavLink MsgMenuLmsUpload $ LmsResultUploadR sid qsh
|
[ defNavLink MsgMenuLmsUpload $ LmsResultUploadR sid qsh
|
||||||
, defNavLink MsgMenuLmsDirectUpload $ LmsResultDirectR sid qsh
|
, defNavLink MsgMenuLmsDirectUpload $ LmsResultDirectR sid qsh
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
, NavPageActionSecondary {
|
, NavPageActionSecondary {
|
||||||
navLink = defNavLink MsgMenuLmsEdit $ LmsEditR sid qsh
|
navLink = defNavLink MsgMenuLmsEdit $ LmsEditR sid qsh
|
||||||
}
|
}
|
||||||
, NavPageActionSecondary {
|
, NavPageActionSecondary {
|
||||||
navLink = defNavLink MsgMenuLmsFake $ LmsFakeR sid qsh
|
navLink = defNavLink MsgMenuLmsFake $ LmsFakeR sid qsh
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -2521,14 +2527,14 @@ pageActions ApiDocsR = return
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
pageActions PrintCenterR = do
|
pageActions PrintCenterR = do
|
||||||
openDays <- useRunDB $ Ex.select $ do
|
openDays <- useRunDB $ Ex.select $ do
|
||||||
pj <- Ex.from $ Ex.table @PrintJob
|
pj <- Ex.from $ Ex.table @PrintJob
|
||||||
let pjDay = E.day $ pj Ex.^. PrintJobCreated
|
let pjDay = E.day $ pj Ex.^. PrintJobCreated
|
||||||
Ex.where_ $ Ex.isNothing (pj Ex.^. PrintJobAcknowledged)
|
Ex.where_ $ Ex.isNothing (pj Ex.^. PrintJobAcknowledged)
|
||||||
Ex.orderBy [ Ex.asc pjDay ]
|
Ex.orderBy [ Ex.asc pjDay ]
|
||||||
pure (pjDay, pj Ex.^. PrintJobId)
|
pure (pjDay, pj Ex.^. PrintJobId)
|
||||||
|
|
||||||
let dayMap = Map.fromListWith (<>) (openDays <&> (\(Ex.unValue -> pjDay, Ex.unValue -> pjId) -> (pjDay, Set.singleton pjId)))
|
let dayMap = Map.fromListWith (<>) (openDays <&> (\(Ex.unValue -> pjDay, Ex.unValue -> pjId) -> (pjDay, Set.singleton pjId)))
|
||||||
toDayAck (d, pjIds) = do
|
toDayAck (d, pjIds) = do
|
||||||
dtxt <- formatTime SelFormatDate d
|
dtxt <- formatTime SelFormatDate d
|
||||||
let n = Set.size pjIds
|
let n = Set.size pjIds
|
||||||
@ -2536,7 +2542,7 @@ pageActions PrintCenterR = do
|
|||||||
msg = "#" <> tshow n <> ", " <> dtxt
|
msg = "#" <> tshow n <> ", " <> dtxt
|
||||||
return NavPageActionPrimary
|
return NavPageActionPrimary
|
||||||
{ navLink = NavLink
|
{ navLink = NavLink
|
||||||
{ navLabel = SomeMessage msg
|
{ navLabel = SomeMessage msg
|
||||||
, navRoute = PrintAckR d n h
|
, navRoute = PrintAckR d n h
|
||||||
, navAccess' = NavAccessTrue
|
, navAccess' = NavAccessTrue
|
||||||
, navType = NavTypeLink { navModal = True }
|
, navType = NavTypeLink { navModal = True }
|
||||||
@ -2556,7 +2562,7 @@ pageActions PrintCenterR = do
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dayLinks <- mapM toDayAck $ Map.toAscList dayMap
|
dayLinks <- mapM toDayAck $ Map.toAscList dayMap
|
||||||
return $ manualSend : take 9 dayLinks
|
return $ manualSend : take 9 dayLinks
|
||||||
|
|
||||||
pageActions _ = return []
|
pageActions _ = return []
|
||||||
|
|
||||||
|
|||||||
@ -20,9 +20,25 @@ import Development.GitRev
|
|||||||
|
|
||||||
import Auth.LDAP (ADError(..), ADInvalidCredentials(..), CampusMessage(..))
|
import Auth.LDAP (ADError(..), ADInvalidCredentials(..), CampusMessage(..))
|
||||||
|
|
||||||
import Yesod.Auth.Message(AuthMessage(..))
|
import Yesod.Auth.Message(AuthMessage(..))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
pickLegalExternalLang :: Handler LegalExternal
|
||||||
|
pickLegalExternalLang = do
|
||||||
|
langMap <- $cachedHereBinary ("legal_external"::Text) makeMapLegalExternal
|
||||||
|
availLangs <- case nonEmpty' (Map.keys langMap) of
|
||||||
|
Just ls -> pure ls
|
||||||
|
Nothing -> $logErrorS "Legal" "Configuration of external legal links is missing." >> notFound
|
||||||
|
lang <- selectLanguage availLangs
|
||||||
|
return $ langMap ! lang
|
||||||
|
where
|
||||||
|
makeMapLegalExternal :: Handler (Map Lang LegalExternal)
|
||||||
|
makeMapLegalExternal = do
|
||||||
|
legExs <- getsYesod $ view _appLegalExternal
|
||||||
|
return $ Set.foldl' (\acc le -> Map.singleton (externalLanguage le) le <> acc) mempty legExs
|
||||||
|
-- return $ Map.fromAscList [(externalLanguage le,le) | le <- Set.toAscList legExs]
|
||||||
|
|
||||||
|
|
||||||
-- | Versionsgeschichte
|
-- | Versionsgeschichte
|
||||||
getVersionR :: Handler TypedContent
|
getVersionR :: Handler TypedContent
|
||||||
getVersionR = selectRep $ do
|
getVersionR = selectRep $ do
|
||||||
@ -31,6 +47,29 @@ getVersionR = selectRep $ do
|
|||||||
provideRep getInfoR
|
provideRep getInfoR
|
||||||
|
|
||||||
|
|
||||||
|
getImprintR :: Handler Html
|
||||||
|
getImprintR = do
|
||||||
|
le <- pickLegalExternalLang
|
||||||
|
redirect $ externalImprint le
|
||||||
|
|
||||||
|
getDataProtectionR :: Handler Html
|
||||||
|
getDataProtectionR = do
|
||||||
|
le <- pickLegalExternalLang
|
||||||
|
redirect $ externalDataProtection le
|
||||||
|
|
||||||
|
getPaymentsR :: Handler Html
|
||||||
|
getPaymentsR = do
|
||||||
|
le <- pickLegalExternalLang
|
||||||
|
redirect $ externalPayments le
|
||||||
|
|
||||||
|
getTermsOfUseR :: Handler Html
|
||||||
|
getTermsOfUseR = do
|
||||||
|
le <- pickLegalExternalLang
|
||||||
|
redirect $ externalTermsOfUse le
|
||||||
|
|
||||||
|
getInfoSupervisorR :: Handler Html
|
||||||
|
getInfoSupervisorR = error "TODO"
|
||||||
|
|
||||||
-- | Datenschutzerklaerung und Aufbewahrungspflichten, Nutzungsbedingungen, Urheberrecht, Impressum
|
-- | Datenschutzerklaerung und Aufbewahrungspflichten, Nutzungsbedingungen, Urheberrecht, Impressum
|
||||||
getLegalR :: Handler Html
|
getLegalR :: Handler Html
|
||||||
getLegalR =
|
getLegalR =
|
||||||
|
|||||||
@ -246,6 +246,8 @@ data AppSettings = AppSettings
|
|||||||
, appCommunicationAttachmentsMaxSize :: Maybe Natural
|
, appCommunicationAttachmentsMaxSize :: Maybe Natural
|
||||||
|
|
||||||
, appFileChunkingParams :: FastCDCParameters
|
, appFileChunkingParams :: FastCDCParameters
|
||||||
|
|
||||||
|
, appLegalExternal :: Set LegalExternal
|
||||||
|
|
||||||
} deriving Show
|
} deriving Show
|
||||||
|
|
||||||
@ -412,6 +414,17 @@ data SettingBotMitigation
|
|||||||
deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable)
|
deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable)
|
||||||
deriving anyclass (Universe, Finite)
|
deriving anyclass (Universe, Finite)
|
||||||
|
|
||||||
|
data LegalExternal = LegalExternal
|
||||||
|
{ externalLanguage :: Lang
|
||||||
|
, externalImprint :: Text
|
||||||
|
, externalDataProtection :: Text
|
||||||
|
, externalTermsOfUse :: Text
|
||||||
|
, externalPayments :: Text
|
||||||
|
}
|
||||||
|
deriving (Eq, Ord, Read, Show, Generic, Typeable)
|
||||||
|
makeLenses_ ''LegalExternal
|
||||||
|
|
||||||
|
|
||||||
nullaryPathPiece ''ApprootScope $ camelToPathPiece' 1
|
nullaryPathPiece ''ApprootScope $ camelToPathPiece' 1
|
||||||
pathPieceJSON ''ApprootScope
|
pathPieceJSON ''ApprootScope
|
||||||
pathPieceJSONKey ''ApprootScope
|
pathPieceJSONKey ''ApprootScope
|
||||||
@ -585,6 +598,14 @@ instance FromJSON ServerSessionSettings where
|
|||||||
, ServerSession.setPersistentCookies <$> persistentCookies
|
, ServerSession.setPersistentCookies <$> persistentCookies
|
||||||
])
|
])
|
||||||
|
|
||||||
|
instance FromJSON LegalExternal where
|
||||||
|
parseJSON = withObject "LegalExternal" $ \o -> do
|
||||||
|
externalLanguage <- o .: "language"
|
||||||
|
externalImprint <- o .: "imprint"
|
||||||
|
externalDataProtection <- o .: "data-protection"
|
||||||
|
externalTermsOfUse<- o .: "terms-of-use"
|
||||||
|
externalPayments <- o .: "payments"
|
||||||
|
return LegalExternal{..}
|
||||||
|
|
||||||
instance FromJSON AppSettings where
|
instance FromJSON AppSettings where
|
||||||
parseJSON = withObject "AppSettings" $ \o -> do
|
parseJSON = withObject "AppSettings" $ \o -> do
|
||||||
@ -779,6 +800,8 @@ instance FromJSON AppSettings where
|
|||||||
|
|
||||||
appCommunicationAttachmentsMaxSize <- o .:? "communication-attachments-max-size"
|
appCommunicationAttachmentsMaxSize <- o .:? "communication-attachments-max-size"
|
||||||
|
|
||||||
|
appLegalExternal <- o .: "legal-external"
|
||||||
|
|
||||||
return AppSettings{..}
|
return AppSettings{..}
|
||||||
where isValidARCConf ARCConf{..} = arccMaximumWeight > 0
|
where isValidARCConf ARCConf{..} = arccMaximumWeight > 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user