Commit 29a56a37 authored by Bas Lijnse's avatar Bas Lijnse

Simplified import of demo users

parent 2cf4576d
......@@ -98,7 +98,7 @@ instance Startable WorkflowCollection
where
toStartable {WorkflowCollection|name,loginMessage,welcomeMessage,allowGuests,workflows} =
[onStartup (installWorkflows workflows)
,onStartup installDemoUsers
,onStartup importDemoUsersFlow
,onRequest "/" (loginAndManageWork name loginMessage welcomeMessage allowGuests)
]
......@@ -110,11 +110,6 @@ installWorkflows iflows
[] = set iflows workflows @! ()
_ = return ()
installDemoUsers :: Task ()
installDemoUsers
= try (get users) (\(StoreReadBuildVersionError _) -> return [])
>>- \us -> if (length us <= 1) (importDemoUsersFlow @! ()) (return ()) //No users, or just a single root user
loginAndManageWork :: !String !(Maybe HtmlTag) !(Maybe HtmlTag) !Bool -> Task ()
loginAndManageWork applicationName loginMessage welcomeMessage allowGuests
= forever
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment