Added auto wizard to frontend.
This commit is contained in:
parent
9fc50fa4b9
commit
af20b86d84
3 changed files with 42 additions and 7 deletions
|
@ -36,6 +36,17 @@ class Index extends App.ControllerContent
|
||||||
@navigate '#login'
|
@navigate '#login'
|
||||||
return
|
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
|
# check if import is active
|
||||||
if data.import_mode == true
|
if data.import_mode == true
|
||||||
@navigate '#import/' + data.import_backend
|
@navigate '#import/' + data.import_backend
|
||||||
|
|
|
@ -34,6 +34,26 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password}
|
||||||
# check if first user already exists
|
# check if first user already exists
|
||||||
return if setup_done_response
|
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 master user already exists, we need to be authenticated
|
||||||
if setup_done
|
if setup_done
|
||||||
return if !authentication_check
|
return if !authentication_check
|
||||||
|
|
|
@ -1,27 +1,31 @@
|
||||||
{
|
{
|
||||||
"Users": [
|
"Users": [
|
||||||
{
|
{
|
||||||
"login": "nicole.braun@zammad.org",
|
"login": "hans.atila@zammad.org",
|
||||||
"firstname": "Nicole",
|
"firstname": "Hans",
|
||||||
"lastname": "Braun",
|
"lastname": "Atila",
|
||||||
"email": "nicole.braun@zammad.org",
|
"email": "hans.atila@zammad.org",
|
||||||
"password": "Z4mm4dr0ckZ!"
|
"password": "Z4mm4dr0ckZ!"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Settings": [
|
"Settings": [
|
||||||
{
|
{
|
||||||
"name": "developer_mode",
|
"name": "developer_mode",
|
||||||
"value": "true"
|
"value": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "product_name",
|
"name": "product_name",
|
||||||
"value": "Zammad Demo System"
|
"value": "Zammad Demo System"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "system_online_service",
|
||||||
|
"value": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"EmailAddresses": [
|
"EmailAddresses": [
|
||||||
{
|
{
|
||||||
"realname": "Zammad Demo System",
|
"realname": "Zammad Demo System",
|
||||||
"email": "zammad@localhost",
|
"email": "zammad@localhost"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue