From 3de34cd5ae7c9c748e10997192915d2ad04fc44b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 1 Aug 2018 15:42:10 +0200 Subject: [PATCH] Plugin whitelist --- messages/uniworx/de.msg | 5 ++++- src/Foundation.hs | 2 -- templates/login.hamlet | 14 ++++++++------ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/messages/uniworx/de.msg b/messages/uniworx/de.msg index 330ebb0e3..5f4529214 100644 --- a/messages/uniworx/de.msg +++ b/messages/uniworx/de.msg @@ -251,4 +251,7 @@ EditedBy name@Text time@Text: Durch #{name} um #{time} LastEdit: Letzte Änderung SubmissionFilesIgnored: Es wurden Dateien in der hochgeladenen Abgabe ignoriert: -SubmissionDoesNotExist smid@CryptoFileNameSubmission: Es existiert keine Abgabe mit Nummer #{toPathPiece smid}. \ No newline at end of file +SubmissionDoesNotExist smid@CryptoFileNameSubmission: Es existiert keine Abgabe mit Nummer #{toPathPiece smid}. + +LDAPLoginTitle: Campus-Login +DummyLoginTitle: Development-Login \ No newline at end of file diff --git a/src/Foundation.hs b/src/Foundation.hs index 381aba0e1..24394863f 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -1089,8 +1089,6 @@ instance YesodAuth UniWorX where = (dummyPlugin, dummyIdent) | otherwise = (credsPlugin, credsIdent) - isDummy = credsPlugin == "dummy" - isPWFile = credsPlugin == "PWFile" uAuth = UniqueAuthentication userPlugin userIdent $logDebugS "auth" $ tshow creds diff --git a/templates/login.hamlet b/templates/login.hamlet index 6056528d0..ad6ff756f 100644 --- a/templates/login.hamlet +++ b/templates/login.hamlet @@ -1,7 +1,9 @@ $forall AuthPlugin{..} <- plugins -
- $if apName == "LDAP" -

Campus-Kennung - $if apName == "dummy" -

Dummy - ^{apLogin toParent} + $if apName == "LDAP" +
+

_{MsgLDAPLoginTitle} + ^{apLogin toParent} + $elseif apName == "dummy" +
+

_{MsgDummyLoginTitle} + ^{apLogin toParent}