From 765b31447bdc54ad913db5bfb044450aad97ae5c Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Sat, 30 Nov 2019 20:19:34 +0100 Subject: [PATCH] Instructions how to use Gonito for papers available to all --- Foundation.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Foundation.hs b/Foundation.hs index a5fa166..2138023 100644 --- a/Foundation.hs +++ b/Foundation.hs @@ -10,11 +10,8 @@ import qualified Yesod.Core.Unsafe as Unsafe import Yesod.Core.Types (Logger) import Yesod.Default.Util (addStaticContentExternal) -import Text.Blaze import Text.Blaze.Internal (MarkupM) -import Data.Default - instance HashDBUser User where userPasswordHash = userPassword setPasswordHash h u = u { userPassword = Just h } @@ -52,7 +49,7 @@ mkYesodData "App" $(parseRoutesFile "config/routes") mkMessage "App" "messages" "en" -- | A convenient synonym for creating forms. -type Form x = Html -> MForm (HandlerT App IO) (FormResult x, Widget) +type Form x = Html -> MForm (HandlerFor App) (FormResult x, Widget) -- | A convenient synonym for database access functions. type DB a = forall (m :: * -> *). @@ -179,6 +176,7 @@ instance Yesod App where isAuthorized Presentation4RealR _ = return Authorized isAuthorized PresentationPSNC2019R _ = return Authorized isAuthorized GonitoInClassR _ = return Authorized + isAuthorized WritingPapersWithGonitoR _ = return Authorized isAuthorized (AvatarR _) _ = return Authorized