Instructions how to use Gonito for papers available to all
This commit is contained in:
parent
c1e901afb4
commit
765b31447b
@ -10,11 +10,8 @@ import qualified Yesod.Core.Unsafe as Unsafe
|
|||||||
import Yesod.Core.Types (Logger)
|
import Yesod.Core.Types (Logger)
|
||||||
import Yesod.Default.Util (addStaticContentExternal)
|
import Yesod.Default.Util (addStaticContentExternal)
|
||||||
|
|
||||||
import Text.Blaze
|
|
||||||
import Text.Blaze.Internal (MarkupM)
|
import Text.Blaze.Internal (MarkupM)
|
||||||
|
|
||||||
import Data.Default
|
|
||||||
|
|
||||||
instance HashDBUser User where
|
instance HashDBUser User where
|
||||||
userPasswordHash = userPassword
|
userPasswordHash = userPassword
|
||||||
setPasswordHash h u = u { userPassword = Just h }
|
setPasswordHash h u = u { userPassword = Just h }
|
||||||
@ -52,7 +49,7 @@ mkYesodData "App" $(parseRoutesFile "config/routes")
|
|||||||
mkMessage "App" "messages" "en"
|
mkMessage "App" "messages" "en"
|
||||||
|
|
||||||
-- | A convenient synonym for creating forms.
|
-- | 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.
|
-- | A convenient synonym for database access functions.
|
||||||
type DB a = forall (m :: * -> *).
|
type DB a = forall (m :: * -> *).
|
||||||
@ -179,6 +176,7 @@ instance Yesod App where
|
|||||||
isAuthorized Presentation4RealR _ = return Authorized
|
isAuthorized Presentation4RealR _ = return Authorized
|
||||||
isAuthorized PresentationPSNC2019R _ = return Authorized
|
isAuthorized PresentationPSNC2019R _ = return Authorized
|
||||||
isAuthorized GonitoInClassR _ = return Authorized
|
isAuthorized GonitoInClassR _ = return Authorized
|
||||||
|
isAuthorized WritingPapersWithGonitoR _ = return Authorized
|
||||||
|
|
||||||
isAuthorized (AvatarR _) _ = return Authorized
|
isAuthorized (AvatarR _) _ = return Authorized
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user