Merge branch 'master' into fix/ldap

This commit is contained in:
Steffen Jost 2021-12-13 17:44:15 +01:00
commit 49227a5714
4 changed files with 5 additions and 4 deletions

View File

@ -6,7 +6,7 @@ School json
examMinimumRegisterBeforeStart NominalDiffTime Maybe
examMinimumRegisterDuration NominalDiffTime Maybe
examRequireModeForRegistration Bool default=false
examDiscouragedModes ExamModeDNF default='{"dnf-terms": []}'
examDiscouragedModes ExamModeDNF default='{"dnf-terms":[]}'
examCloseMode ExamCloseMode default='separate'
sheetAuthorshipStatementMode SchoolAuthorshipStatementMode default='optional'
sheetAuthorshipStatementDefinition AuthorshipStatementDefinitionId Maybe

View File

@ -26,7 +26,7 @@ let
# pandoc # just for manual testing within the pod, remove for production, since we use the library instead!
curl wget netcat # just for manual testing within the pod, remove for production!
openldap # just for manual testing within the pod, remove for production!
build-essentials
iana-etc
] ++ optionals isDemo [ postgresql_12 memcached uniworx.uniworx.components.exes.uniworxdb ];
runAsRoot = ''

2
routes
View File

@ -39,7 +39,7 @@
/static StaticR EmbeddedStatic appStatic !free
/auth AuthR Auth getAuth !free
/metrics MetricsR GET
/metrics MetricsR GET !free -- verify if this can be free
/err ErrorR GET !free

View File

@ -137,6 +137,7 @@ yesodMiddleware = cacheControlMiddleware . storeBearerMiddleware . csrfMiddlewar
case route of
MetricsR -> mzero
HealthR -> mzero
StatusR -> mzero
InstanceR -> mzero
AdminCrontabR -> mzero
_other -> return ()
@ -147,7 +148,7 @@ yesodMiddleware = cacheControlMiddleware . storeBearerMiddleware . csrfMiddlewar
approotHost <- hoistMaybe $ approotScopeHost rApproot app
let doRedirect = do
url <- approotRender rApproot route
$logDebugS "normalizeApprootMiddleware" url
$logDebugS "normalizeApprootMiddleware redirect" url
redirect url
if | approotHost /= reqHost
, rApproot /= ApprootUserGenerated