Instructions how to use Gonito for papers available to all

This commit is contained in:
Filip Gralinski 2019-11-30 20:19:34 +01:00
parent c1e901afb4
commit 765b31447b

View File

@ -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