Added auto wizard to frontend.

This commit is contained in:
Martin Edenhofer 2015-04-08 15:55:53 +02:00
parent 9fc50fa4b9
commit af20b86d84
3 changed files with 42 additions and 7 deletions

View file

@ -36,6 +36,17 @@ class Index extends App.ControllerContent
@navigate '#login'
return
# check if auto wizzard is executed
if data.auto_wizzard == true
# login check / get session user
App.Auth.loginCheck()
if App.Config.get('system_online_service')
@navigate 'getting_started/agents'
else
@navigate 'getting_started/channel'
# check if import is active
if data.import_mode == true
@navigate '#import/' + data.import_backend

View file

@ -34,6 +34,26 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password}
# check if first user already exists
return if setup_done_response
# check it auto wizard is already done
auto_wizzard_admin = AutoWizzard.setup
if auto_wizzard_admin
# set current session user
current_user_set(auto_wizzard_admin)
# set system init to done
Setting.set( 'system_init_done', true )
render :json => {
:auto_wizzard => true,
:setup_done => setup_done,
:import_mode => Setting.get('import_mode'),
:import_backend => Setting.get('import_backend'),
:system_online_service => Setting.get('system_online_service'),
}
return
end
# if master user already exists, we need to be authenticated
if setup_done
return if !authentication_check

View file

@ -1,27 +1,31 @@
{
"Users": [
{
"login": "nicole.braun@zammad.org",
"firstname": "Nicole",
"lastname": "Braun",
"email": "nicole.braun@zammad.org",
"login": "hans.atila@zammad.org",
"firstname": "Hans",
"lastname": "Atila",
"email": "hans.atila@zammad.org",
"password": "Z4mm4dr0ckZ!"
}
],
"Settings": [
{
"name": "developer_mode",
"value": "true"
"value": true
},
{
"name": "product_name",
"value": "Zammad Demo System"
},
{
"name": "system_online_service",
"value": true
}
],
"EmailAddresses": [
{
"realname": "Zammad Demo System",
"email": "zammad@localhost",
"email": "zammad@localhost"
}
]
}
}