summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-13 17:23:47 +0100
committerspag <spag@golwen.net>2013-01-13 17:23:47 +0100
commit0b717b40b596fcd6ba238b2b3066b33a91289fdf (patch)
tree5b225d4085ac89532413ed224438d3ba187fda5f /app/controllers
parent0d5114566e73c44799eac83d46f159cd979f4fcc (diff)
parent9567f239586f253002dea0ed654b7bd18a15e572 (diff)
Merge branch 'develop' of github.com:amooma/GS5 into develop
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/config_snom_controller.rb4
-rw-r--r--app/controllers/gemeinschaft_setups_controller.rb5
-rw-r--r--app/controllers/phones_controller.rb1
3 files changed, 8 insertions, 2 deletions
diff --git a/app/controllers/config_snom_controller.rb b/app/controllers/config_snom_controller.rb
index cb664db..24f6e59 100644
--- a/app/controllers/config_snom_controller.rb
+++ b/app/controllers/config_snom_controller.rb
@@ -182,9 +182,9 @@ class ConfigSnomController < ApplicationController
send_sensitve = @provisioning_authenticated || !@phone.provisioning_key_active
@phone_settings = Hash.new()
- if defined?(PROVISIONING_KEY_LENGTH) && PROVISIONING_KEY_LENGTH > 0
+ if !GsParameter.get('PROVISIONING_KEY_LENGTH').nil? && GsParameter.get('PROVISIONING_KEY_LENGTH') > 0
if @phone.provisioning_key.blank?
- @phone.update_attributes({ :provisioning_key => SecureRandom.hex(PROVISIONING_KEY_LENGTH), :provisioning_key_active => false })
+ @phone.update_attributes({ :provisioning_key => SecureRandom.hex(GsParameter.get('PROVISIONING_KEY_LENGTH')), :provisioning_key_active => false })
elsif @provisioning_authenticated
@phone.update_attributes({ :provisioning_key_active => true })
end
diff --git a/app/controllers/gemeinschaft_setups_controller.rb b/app/controllers/gemeinschaft_setups_controller.rb
index 73a748c..81faf2a 100644
--- a/app/controllers/gemeinschaft_setups_controller.rb
+++ b/app/controllers/gemeinschaft_setups_controller.rb
@@ -41,6 +41,11 @@ class GemeinschaftSetupsController < ApplicationController
super_tenant_super_admin_group = super_tenant.user_groups.create(:name => t('gemeinschaft_setups.initial_setup.super_admin_group_name'))
super_tenant_super_admin_group.user_group_memberships.create(:user_id => user.id)
+ # Set a couple of URLs in the GsParameter table
+ GsParameter.where(:name => 'phone_book_entry_image_url').first.update_attributes(:value => "http://#{@gemeinschaft_setup.sip_domain.host}/uploads/phone_book_entry/image")
+ GsParameter.where(:name => 'ringtone_url').first.update_attributes(:value => "http://#{@gemeinschaft_setup.sip_domain.host}")
+ GsParameter.where(:name => 'user_image_url').first.update_attributes(:value => "http://#{@gemeinschaft_setup.sip_domain.host}/uploads/user/image")
+
# Auto-Login:
session[:user_id] = user.id
diff --git a/app/controllers/phones_controller.rb b/app/controllers/phones_controller.rb
index 14735e6..3672390 100644
--- a/app/controllers/phones_controller.rb
+++ b/app/controllers/phones_controller.rb
@@ -46,6 +46,7 @@ class PhonesController < ApplicationController
m = method( :"#{@phoneable.class.name.underscore}_phone_path" )
redirect_to m.( @phoneable, @phone ), :notice => t('phones.controller.successfuly_updated')
else
+ set_fallback_sip_accounts
render :edit
end
end