diff --git a/src/Foundation/SiteLayout.hs b/src/Foundation/SiteLayout.hs index 46d3f9272..3275485a2 100644 --- a/src/Foundation/SiteLayout.hs +++ b/src/Foundation/SiteLayout.hs @@ -156,6 +156,10 @@ siteLayout' overrideHeading widget = do -- isParent r = r == (fst parents) isAuth <- isJust <$> maybeAuthId + + when (appAutoSignOn && not isAuth) $ do + $logDebugS "AutoSignOn" "AutoSignOn is enabled in AppSettings and user is not authenticated" + redirect $ AuthR LoginR now <- liftIO getCurrentTime