Safe Haskell | None |
---|---|
Language | Haskell2010 |
- liftU :: UnsafeAction FActionError FrontendSessionData a -> FAction a
- loggerF :: Show v => v -> FAction ()
- loggerU :: Show v => v -> UnsafeAction FActionError s ()
- setTab :: DashboardTab -> FAction ()
- renderDashboard :: (User -> [Role] -> Html) -> FAction Html
- renderDashboard' :: (User -> [Role] -> FAction Html) -> FAction Html
- runAsUserOrLogin :: (FrontendSessionData -> FrontendSessionLoginData -> FAction a) -> FAction a
- runAsUser :: (FrontendSessionData -> FrontendSessionLoginData -> FAction a) -> FAction a -> FAction a
- popServiceLoginState :: FAction (Maybe ServiceLoginState)
- getServiceLoginState :: FAction ServiceLoginState
- sendFrontendMsgs :: [FrontendMsg] -> FAction ()
- sendFrontendMsg :: FrontendMsg -> FAction ()
- clearAllFrontendMsgs :: FAction ()
- showPageWithMessages :: (FrontendSessionData -> View Html -> ST -> Html) -> View Html -> ST -> FAction Html
- emailConfirmUrl :: HttpConfig -> ST -> ST -> ST
- redirect' :: SBS -> FAction a
- redirectURI :: URI -> FAction a
- redirectRR :: RelativeRef -> FAction a
helpers
liftU :: UnsafeAction FActionError FrontendSessionData a -> FAction a
loggerU :: Show v => v -> UnsafeAction FActionError s ()
dashboard construction
setTab :: DashboardTab -> FAction ()
If logged in: set current dashboard tab.
renderDashboard :: (User -> [Role] -> Html) -> FAction Html
Call renderDashboard'
to construct a dashboard page and render it in the frontend monad.
renderDashboard' :: (User -> [Role] -> FAction Html) -> FAction Html
Like renderDashboard
, but take a pagelet builder instead of a pagelet.
authentication
runAsUserOrLogin :: (FrontendSessionData -> FrontendSessionLoginData -> FAction a) -> FAction a
Call runAsUser
, and redirect to login page if not logged in.
runAsUser :: (FrontendSessionData -> FrontendSessionLoginData -> FAction a) -> FAction a -> FAction a
Runs a given handler with the credentials and the session data of the currently logged-in user.
If not logged in, call a default handler that runs without any special clearance. (NOTE:
Clearance modification does not happen here, but in enterFAction
.)
session management
popServiceLoginState :: FAction (Maybe ServiceLoginState)
sendFrontendMsgs :: [FrontendMsg] -> FAction ()
sendFrontendMsg :: FrontendMsg -> FAction ()
clearAllFrontendMsgs :: FAction ()
showPageWithMessages :: (FrontendSessionData -> View Html -> ST -> Html) -> View Html -> ST -> FAction Html
uri manipulation
emailConfirmUrl :: HttpConfig -> ST -> ST -> ST
redirectURI :: URI -> FAction a
redirectRR :: RelativeRef -> FAction a