summaryrefslogtreecommitdiff
path: root/app/controllers/gemeinschaft_setups_controller.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-06-20 19:06:19 +0200
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-06-20 19:06:19 +0200
commiteb0e1cc5c26275ff3e5c341404e8bc558f8312b8 (patch)
tree71f449ccd6f15422717de3ac24f87d5e888ddd79 /app/controllers/gemeinschaft_setups_controller.rb
parentdf6e17e48995f25e72509986f30700d778b179b6 (diff)
parent3b27a5d45b12f6bac65da2a8e17387bfda42a2f1 (diff)
Merge branch 'develop'
Diffstat (limited to 'app/controllers/gemeinschaft_setups_controller.rb')
-rw-r--r--app/controllers/gemeinschaft_setups_controller.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/controllers/gemeinschaft_setups_controller.rb b/app/controllers/gemeinschaft_setups_controller.rb
index 4949fa7..96b1dcb 100644
--- a/app/controllers/gemeinschaft_setups_controller.rb
+++ b/app/controllers/gemeinschaft_setups_controller.rb
@@ -99,6 +99,22 @@ class GemeinschaftSetupsController < ApplicationController
# Auto-Login:
session[:user_id] = user.id
+ # Perimeter settings
+ if !@gemeinschaft_setup.detect_attacks
+ detect_attacks = GsParameter.where(:entity => 'events', :section => 'modules', :name => 'perimeter_defense').first
+ if detect_attacks
+ detect_attacks.update_attributes(:value => '0', :class_type => 'Integer')
+ end
+ end
+
+ if !@gemeinschaft_setup.report_attacks
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'report_url', :value => '', :class_type => 'String', :description => '')
+ report_url = GsParameter.where(:entity => 'perimeter', :section => 'general', :name => 'report_url').first
+ if report_url
+ report_url.update_attributes(:value => '', :class_type => 'String')
+ end
+ end
+
# Redirect to the user
redirect_to page_help_path, :notice => t('gemeinschaft_setups.initial_setup.successful_setup')
else