From 518d4c26322c5a62eeed886f121cf829e8a613c4 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 28 Sep 2015 02:11:44 +0200 Subject: [PATCH] Added support for ip based calendar setup. --- contrib/auto_wizard_example.json | 3 +++ lib/auto_wizard.rb | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/contrib/auto_wizard_example.json b/contrib/auto_wizard_example.json index 8f046a366..4f0ead85a 100644 --- a/contrib/auto_wizard_example.json +++ b/contrib/auto_wizard_example.json @@ -1,5 +1,8 @@ { "Token": "secret_token", + "CalendarSetup": { + "Ip": "195.65.29.254" + }, "Users": [ { "login": "hans.atila@zammad.org", diff --git a/lib/auto_wizard.rb b/lib/auto_wizard.rb index 9c0954a2a..0fd187351 100644 --- a/lib/auto_wizard.rb +++ b/lib/auto_wizard.rb @@ -63,6 +63,13 @@ returns UserInfo.current_user_id = admin_user.id + # set default calendar + if auto_wizard_hash['CalendarSetup'] + if auto_wizard_hash['CalendarSetup']['Ip'] + Calendar.init_setup(auto_wizard_hash['CalendarSetup']['Ip']) + end + end + # set Settings if auto_wizard_hash['Settings'] auto_wizard_hash['Settings'].each { |setting_data|