summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-05 23:01:16 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-05 23:01:16 +0100
commitddb3dfa92ec0878240211cb2b7a8e125961b1360 (patch)
tree0111ac9f589d97503046d9a81cd3af841e17501d /app
parente76890d5f4634d47514a592d501d9792ae2ff7bb (diff)
Moved to GsParemeter.get and set defaults for a couple of validations.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/api/rows_controller.rb2
-rw-r--r--app/controllers/application_controller.rb4
-rw-r--r--app/controllers/call_forwards_controller.rb4
-rw-r--r--app/controllers/call_histories_controller.rb2
-rw-r--r--app/controllers/conferences_controller.rb2
-rw-r--r--app/controllers/config_siemens_controller.rb26
-rw-r--r--app/controllers/config_snom_controller.rb22
-rw-r--r--app/controllers/fax_accounts_controller.rb4
-rw-r--r--app/controllers/gemeinschaft_setups_controller.rb2
-rw-r--r--app/controllers/gs_nodes_controller.rb2
-rw-r--r--app/controllers/phone_book_entries_controller.rb2
-rw-r--r--app/controllers/phone_books_controller.rb4
-rw-r--r--app/controllers/sessions_controller.rb2
-rw-r--r--app/controllers/sip_accounts_controller.rb16
-rw-r--r--app/controllers/voicemail_messages_controller.rb6
-rw-r--r--app/mailers/notifications.rb8
-rw-r--r--app/models/ability.rb2
-rw-r--r--app/models/access_authorization.rb4
-rw-r--r--app/models/api/row.rb2
-rw-r--r--app/models/call_forward.rb2
-rw-r--r--app/models/conference.rb4
-rw-r--r--app/models/conference_invitee.rb2
-rw-r--r--app/models/fax_document.rb4
-rw-r--r--app/models/gs_cluster_sync_log_entry.rb4
-rw-r--r--app/models/gs_parameter.rb25
-rw-r--r--app/models/hunt_group.rb8
-rw-r--r--app/models/phone_number.rb16
-rw-r--r--app/models/phone_number_range.rb2
-rw-r--r--app/models/sip_account.rb4
-rw-r--r--app/models/tenant.rb22
-rw-r--r--app/models/user.rb3
-rw-r--r--app/views/call_forwards/_form_core.html.haml2
-rw-r--r--app/views/callthroughs/_form_core.html.haml2
-rw-r--r--app/views/callthroughs/_index_core.html.haml4
-rw-r--r--app/views/callthroughs/show.html.haml2
-rw-r--r--app/views/conferences/_form_core.html.haml2
-rw-r--r--app/views/config_snom/show.xml.haml4
-rw-r--r--app/views/config_snom/state_settings.xml.haml2
-rw-r--r--app/views/gemeinschaft_setups/new.de.html.haml2
-rw-r--r--app/views/gemeinschaft_setups/new.html.haml2
-rw-r--r--app/views/hunt_groups/_form_core.html.haml4
-rw-r--r--app/views/layouts/application.html.haml2
-rw-r--r--app/views/page/beginners_intro.de.html.haml4
-rw-r--r--app/views/page/beginners_intro.html.haml4
-rw-r--r--app/views/page/index.de.html.haml2
-rw-r--r--app/views/page/index.html.haml2
-rw-r--r--app/views/phones/_form_core.html.haml2
-rw-r--r--app/views/phones/show.html.haml2
-rw-r--r--app/views/tenants/_admin_area.de.html.haml6
-rw-r--r--app/views/tenants/_admin_area.html.haml6
-rw-r--r--app/views/tenants/_form.html.haml6
51 files changed, 142 insertions, 132 deletions
diff --git a/app/controllers/api/rows_controller.rb b/app/controllers/api/rows_controller.rb
index 6e815eb..543aebe 100644
--- a/app/controllers/api/rows_controller.rb
+++ b/app/controllers/api/rows_controller.rb
@@ -84,7 +84,7 @@ class Api::RowsController < ApplicationController
private
def check_remote_ip_address_whitelist
- if !(REMOTE_IP_ADDRESS_WHITELIST.empty? or REMOTE_IP_ADDRESS_WHITELIST.include?(ENV['REMOTE_ADDR']))
+ if !(GsParameter.get('REMOTE_IP_ADDRESS_WHITELIST').empty? or GsParameter.get('REMOTE_IP_ADDRESS_WHITELIST').include?(ENV['REMOTE_ADDR']))
redirect_to root_url
end
end
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index c675f5c..e4165f3 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -54,8 +54,8 @@ class ApplicationController < ActionController::Base
# Generate a new random PIN
#
def random_pin
- if MINIMUM_PIN_LENGTH > 0
- (1..MINIMUM_PIN_LENGTH).map{|i| (0 .. 9).to_a.sample}.join
+ if GsParameter.get('MINIMUM_PIN_LENGTH') > 0
+ (1..GsParameter.get('MINIMUM_PIN_LENGTH')).map{|i| (0 .. 9).to_a.sample}.join
end
end
diff --git a/app/controllers/call_forwards_controller.rb b/app/controllers/call_forwards_controller.rb
index 5321b35..001ed60 100644
--- a/app/controllers/call_forwards_controller.rb
+++ b/app/controllers/call_forwards_controller.rb
@@ -21,10 +21,10 @@ class CallForwardsController < ApplicationController
def new
@call_forward = @phone_number.call_forwards.build
- @call_forward.depth = DEFAULT_CALL_FORWARD_DEPTH
+ @call_forward.depth = GsParameter.get('DEFAULT_CALL_FORWARD_DEPTH')
@call_forward.active = true
@call_forwarding_destinations = call_forwarding_destination_types()
- @call_forward.destination = CALLFORWARD_DESTINATION_DEFAULT.to_s if defined?(CALLFORWARD_DESTINATION_DEFAULT)
+ @call_forward.destination = GsParameter.get('CALLFORWARD_DESTINATION_DEFAULT').to_s if defined?(GsParameter.get('CALLFORWARD_DESTINATION_DEFAULT'))
@available_call_forward_cases = []
CallForwardCase.all.each do |available_call_forward_case|
diff --git a/app/controllers/call_histories_controller.rb b/app/controllers/call_histories_controller.rb
index f956f88..f711f34 100644
--- a/app/controllers/call_histories_controller.rb
+++ b/app/controllers/call_histories_controller.rb
@@ -22,7 +22,7 @@ class CallHistoriesController < ApplicationController
@call_histories = calls.paginate(
:page => @pagination_page_number,
- :per_page => DEFAULT_PAGINATION_ENTRIES_PER_PAGE
+ :per_page => GsParameter.get('DEFAULT_PAGINATION_ENTRIES_PER_PAGE')
)
@calls_count = calls.count
diff --git a/app/controllers/conferences_controller.rb b/app/controllers/conferences_controller.rb
index 302a23b..6091b46 100644
--- a/app/controllers/conferences_controller.rb
+++ b/app/controllers/conferences_controller.rb
@@ -19,7 +19,7 @@ class ConferencesController < ApplicationController
@conference.start = nil
@conference.end = nil
@conference.open_for_anybody = true
- @conference.max_members = DEFAULT_MAX_CONFERENCE_MEMBERS
+ @conference.max_members = GsParameter.get('DEFAULT_MAX_CONFERENCE_MEMBERS')
@conference.pin = random_pin
@conference.open_for_anybody = true
diff --git a/app/controllers/config_siemens_controller.rb b/app/controllers/config_siemens_controller.rb
index c09dfcf..b7fa107 100644
--- a/app/controllers/config_siemens_controller.rb
+++ b/app/controllers/config_siemens_controller.rb
@@ -64,8 +64,8 @@ class ConfigSiemensController < ApplicationController
if mac_address
@phone = Phone.find_by_mac_address(mac_address.gsub(':','').upcase)
- if ! @phone && PROVISIONING_AUTO_ADD_PHONE
- tenant = Tenant.where(:id => PROVISIONING_AUTO_TENANT_ID).first
+ if ! @phone && GsParameter.get('PROVISIONING_AUTO_ADD_PHONE')
+ tenant = Tenant.where(:id => GsParameter.get('PROVISIONING_AUTO_TENANT_ID')).first
if ! tenant
render(
:status => 404,
@@ -91,12 +91,12 @@ class ConfigSiemensController < ApplicationController
return
end
- if ! PROVISIONING_AUTO_ADD_SIP_ACCOUNT
+ if ! GsParameter.get('PROVISIONING_AUTO_ADD_SIP_ACCOUNT')
return
end
caller_name_index = 0
- sip_account_last = tenant.sip_accounts.where('caller_name LIKE ?', "#{PROVISIONING_AUTO_SIP_ACCOUNT_CALLER_PREFIX}%").sort { |item1, item2|
+ sip_account_last = tenant.sip_accounts.where('caller_name LIKE ?', "#{GsParameter.get('PROVISIONING_AUTO_SIP_ACCOUNT_CALLER_PREFIX')}%").sort { |item1, item2|
item1.caller_name.gsub(/[^0-9]/, '').to_i <=> item2.caller_name.gsub(/[^0-9]/, '').to_i
}.last
@@ -106,18 +106,18 @@ class ConfigSiemensController < ApplicationController
caller_name_index = caller_name_index + 1
@sip_account = tenant.sip_accounts.build
- @sip_account.caller_name = "#{PROVISIONING_AUTO_SIP_ACCOUNT_CALLER_PREFIX}#{caller_name_index}"
- @sip_account.call_waiting = CALL_WAITING
- @sip_account.clir = DEFAULT_CLIR_SETTING
- @sip_account.clip = DEFAULT_CLIP_SETTING
+ @sip_account.caller_name = "#{GsParameter.get('PROVISIONING_AUTO_SIP_ACCOUNT_CALLER_PREFIX')}#{caller_name_index}"
+ @sip_account.call_waiting = GsParameter.get('CALL_WAITING')
+ @sip_account.clir = GsParameter.get('DEFAULT_CLIR_SETTING')
+ @sip_account.clip = GsParameter.get('DEFAULT_CLIP_SETTING')
@sip_account.voicemail_pin = random_pin
- @sip_account.callforward_rules_act_per_sip_account = CALLFORWARD_RULES_ACT_PER_SIP_ACCOUNT_DEFAULT
+ @sip_account.callforward_rules_act_per_sip_account = GsParameter.get('CALLFORWARD_RULES_ACT_PER_SIP_ACCOUNT_DEFAULT')
@sip_account.hotdeskable = false
loop do
- @sip_account.auth_name = SecureRandom.hex(DEFAULT_LENGTH_SIP_AUTH_NAME)
+ @sip_account.auth_name = SecureRandom.hex(GsParameter.get('DEFAULT_LENGTH_SIP_AUTH_NAME'))
break unless SipAccount.exists?(:auth_name => @sip_account.auth_name)
end
- @sip_account.password = SecureRandom.hex(DEFAULT_LENGTH_SIP_PASSWORD)
+ @sip_account.password = SecureRandom.hex(GsParameter.get('DEFAULT_LENGTH_SIP_PASSWORD'))
if ! @sip_account.save
render(
@@ -439,7 +439,7 @@ class ConfigSiemensController < ApplicationController
@new_settings << ['XML-app-debug-prog-name', 2, '']
@new_settings << ['XML-app-num-tabs', 2, '3']
@new_settings << ['XML-app-restart', 2, 'true']
- @new_settings << ['XML-app-tab1-display-name', 2, "Gemeinschaft #{GEMEINSCHAFT_VERSION}"]
+ @new_settings << ['XML-app-tab1-display-name', 2, "Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}"]
@new_settings << ['XML-app-tab1-name', 2, 'menu']
@new_settings << ['XML-app-tab2-display-name', 2, 'Status']
@new_settings << ['XML-app-tab2-name', 2, 'menu_status']
@@ -816,7 +816,7 @@ class ConfigSiemensController < ApplicationController
auto_reload_time = 60
- SIEMENS_HISTORY_RELOAD_TIMES.each_pair do |time_range, reload_value|
+ GsParameter.get('SIEMENS_HISTORY_RELOAD_TIMES').each_pair do |time_range, reload_value|
if time_range === Time.now.localtime.hour
auto_reload_time = reload_value
end
diff --git a/app/controllers/config_snom_controller.rb b/app/controllers/config_snom_controller.rb
index 9a06a99..123f2cd 100644
--- a/app/controllers/config_snom_controller.rb
+++ b/app/controllers/config_snom_controller.rb
@@ -34,8 +34,8 @@ class ConfigSnomController < ApplicationController
@phone = Phone.where({ :mac_address => @mac_address }).first
end
- if ! @phone && PROVISIONING_AUTO_ADD_PHONE
- tenant = Tenant.where(:id => PROVISIONING_AUTO_TENANT_ID).first
+ if ! @phone && GsParameter.get('PROVISIONING_AUTO_ADD_PHONE')
+ tenant = Tenant.where(:id => GsParameter.get('PROVISIONING_AUTO_TENANT_ID')).first
if ! tenant
render(
:status => 404,
@@ -94,12 +94,12 @@ class ConfigSnomController < ApplicationController
return
end
- if ! PROVISIONING_AUTO_ADD_SIP_ACCOUNT
+ if ! GsParameter.get('PROVISIONING_AUTO_ADD_SIP_ACCOUNT')
return
end
caller_name_index = 0
- sip_account_last = tenant.sip_accounts.where('caller_name LIKE ?', "#{PROVISIONING_AUTO_SIP_ACCOUNT_CALLER_PREFIX}%").sort { |item1, item2|
+ sip_account_last = tenant.sip_accounts.where('caller_name LIKE ?', "#{GsParameter.get('PROVISIONING_AUTO_SIP_ACCOUNT_CALLER_PREFIX')}%").sort { |item1, item2|
item1.caller_name.gsub(/[^0-9]/, '').to_i <=> item2.caller_name.gsub(/[^0-9]/, '').to_i
}.last
@@ -109,18 +109,18 @@ class ConfigSnomController < ApplicationController
caller_name_index = caller_name_index + 1
@sip_account = tenant.sip_accounts.build
- @sip_account.caller_name = "#{PROVISIONING_AUTO_SIP_ACCOUNT_CALLER_PREFIX}#{caller_name_index}"
- @sip_account.call_waiting = CALL_WAITING
- @sip_account.clir = DEFAULT_CLIR_SETTING
- @sip_account.clip = DEFAULT_CLIP_SETTING
+ @sip_account.caller_name = "#{GsParameter.get('PROVISIONING_AUTO_SIP_ACCOUNT_CALLER_PREFIX')}#{caller_name_index}"
+ @sip_account.call_waiting = GsParameter.get('CALL_WAITING')
+ @sip_account.clir = GsParameter.get('DEFAULT_CLIR_SETTING')
+ @sip_account.clip = GsParameter.get('DEFAULT_CLIP_SETTING')
@sip_account.voicemail_pin = random_pin
- @sip_account.callforward_rules_act_per_sip_account = CALLFORWARD_RULES_ACT_PER_SIP_ACCOUNT_DEFAULT
+ @sip_account.callforward_rules_act_per_sip_account = GsParameter.get('CALLFORWARD_RULES_ACT_PER_SIP_ACCOUNT_DEFAULT')
@sip_account.hotdeskable = false
loop do
- @sip_account.auth_name = SecureRandom.hex(DEFAULT_LENGTH_SIP_AUTH_NAME)
+ @sip_account.auth_name = SecureRandom.hex(GsParameter.get('DEFAULT_LENGTH_SIP_AUTH_NAME'))
break unless SipAccount.exists?(:auth_name => @sip_account.auth_name)
end
- @sip_account.password = SecureRandom.hex(DEFAULT_LENGTH_SIP_PASSWORD)
+ @sip_account.password = SecureRandom.hex(GsParameter.get('DEFAULT_LENGTH_SIP_PASSWORD'))
if ! @sip_account.save
render(
diff --git a/app/controllers/fax_accounts_controller.rb b/app/controllers/fax_accounts_controller.rb
index ce03bc5..031080e 100644
--- a/app/controllers/fax_accounts_controller.rb
+++ b/app/controllers/fax_accounts_controller.rb
@@ -15,8 +15,8 @@ class FaxAccountsController < ApplicationController
def new
@fax_account = @parent.fax_accounts.build
@fax_account.name = generate_a_new_name(@parent, @fax_account)
- @fax_account.days_till_auto_delete = DAYS_TILL_AUTO_DELETE
- @fax_account.retries = DEFAULT_NUMBER_OF_RETRIES
+ @fax_account.days_till_auto_delete = GsParameter.get('DAYS_TILL_AUTO_DELETE')
+ @fax_account.retries = GsParameter.get('DEFAULT_NUMBER_OF_RETRIES')
@fax_account.station_id = @parent.to_s
@fax_account.phone_numbers.build
if @parent.class == User && !@parent.email.blank?
diff --git a/app/controllers/gemeinschaft_setups_controller.rb b/app/controllers/gemeinschaft_setups_controller.rb
index e871862..73a748c 100644
--- a/app/controllers/gemeinschaft_setups_controller.rb
+++ b/app/controllers/gemeinschaft_setups_controller.rb
@@ -21,7 +21,7 @@ class GemeinschaftSetupsController < ApplicationController
def create
if @gemeinschaft_setup.save
super_tenant = Tenant.create(
- :name => SUPER_TENANT_NAME,
+ :name => GsParameter.get('SUPER_TENANT_NAME'),
:country_id => @gemeinschaft_setup.country.id,
:language_id => @gemeinschaft_setup.language_id,
:description => t('gemeinschaft_setups.initial_setup.super_tenant_description'),
diff --git a/app/controllers/gs_nodes_controller.rb b/app/controllers/gs_nodes_controller.rb
index 3667775..17c9e8b 100644
--- a/app/controllers/gs_nodes_controller.rb
+++ b/app/controllers/gs_nodes_controller.rb
@@ -70,7 +70,7 @@ class GsNodesController < ApplicationController
@request_class = '';
end
- @node = GsNode.where(:ip_address => HOMEBASE_IP_ADDRESS).first
+ @node = GsNode.where(:ip_address => GsParameter.get('HOMEBASE_IP_ADDRESS')).first
if @request_class.blank? || @request_class == "tenants"
@tenants = Tenant.where('updated_at > ?', @newer_as)
diff --git a/app/controllers/phone_book_entries_controller.rb b/app/controllers/phone_book_entries_controller.rb
index 823d50e..9cc9f18 100644
--- a/app/controllers/phone_book_entries_controller.rb
+++ b/app/controllers/phone_book_entries_controller.rb
@@ -71,7 +71,7 @@ class PhoneBookEntriesController < ApplicationController
order([ :last_name, :first_name, :organization ]).
paginate(
:page => @pagination_page_number,
- :per_page => DEFAULT_PAGINATION_ENTRIES_PER_PAGE
+ :per_page => GsParameter.get('DEFAULT_PAGINATION_ENTRIES_PER_PAGE')
)
end
diff --git a/app/controllers/phone_books_controller.rb b/app/controllers/phone_books_controller.rb
index 54e7889..5f2d61f 100644
--- a/app/controllers/phone_books_controller.rb
+++ b/app/controllers/phone_books_controller.rb
@@ -22,7 +22,7 @@ class PhoneBooksController < ApplicationController
order([ :last_name, :first_name ]).
paginate(
:page => @pagination_page_number,
- :per_page => DEFAULT_PAGINATION_ENTRIES_PER_PAGE
+ :per_page => GsParameter.get('DEFAULT_PAGINATION_ENTRIES_PER_PAGE')
)
else
# search by name
@@ -39,7 +39,7 @@ class PhoneBooksController < ApplicationController
order([ :last_name, :first_name ]).
paginate(
:page => @pagination_page_number,
- :per_page => DEFAULT_PAGINATION_ENTRIES_PER_PAGE
+ :per_page => GsParameter.get('DEFAULT_PAGINATION_ENTRIES_PER_PAGE')
)
end
end
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index f92ae1c..81b04e0 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -36,7 +36,7 @@ class SessionsController < ApplicationController
private
def redirect_to_https
- if GUI_REDIRECT_HTTPS and ! request.ssl?
+ if GsParameter.get('GUI_REDIRECT_HTTPS') and ! request.ssl?
redirect_to :protocol => "https://"
end
end
diff --git a/app/controllers/sip_accounts_controller.rb b/app/controllers/sip_accounts_controller.rb
index 8292a74..4d042b3 100644
--- a/app/controllers/sip_accounts_controller.rb
+++ b/app/controllers/sip_accounts_controller.rb
@@ -15,11 +15,11 @@ class SipAccountsController < ApplicationController
def new
@sip_account = @parent.sip_accounts.build
@sip_account.caller_name = @parent
- @sip_account.call_waiting = CALL_WAITING
- @sip_account.clir = DEFAULT_CLIR_SETTING
- @sip_account.clip = DEFAULT_CLIP_SETTING
+ @sip_account.call_waiting = GsParameter.get('CALL_WAITING')
+ @sip_account.clir = GsParameter.get('DEFAULT_CLIR_SETTING')
+ @sip_account.clip = GsParameter.get('DEFAULT_CLIP_SETTING')
@sip_account.voicemail_pin = random_pin
- @sip_account.callforward_rules_act_per_sip_account = CALLFORWARD_RULES_ACT_PER_SIP_ACCOUNT_DEFAULT
+ @sip_account.callforward_rules_act_per_sip_account = GsParameter.get('CALLFORWARD_RULES_ACT_PER_SIP_ACCOUNT_DEFAULT')
if @parent.class == User
@sip_account.hotdeskable = true
end
@@ -27,11 +27,11 @@ class SipAccountsController < ApplicationController
# Make sure that we don't use an already taken auth_name
#
loop do
- @sip_account.auth_name = SecureRandom.hex(DEFAULT_LENGTH_SIP_AUTH_NAME)
+ @sip_account.auth_name = SecureRandom.hex(GsParameter.get('DEFAULT_LENGTH_SIP_AUTH_NAME'))
break unless SipAccount.exists?(:auth_name => @sip_account.auth_name)
end
- @sip_account.password = SecureRandom.hex(DEFAULT_LENGTH_SIP_PASSWORD)
+ @sip_account.password = SecureRandom.hex(GsParameter.get('DEFAULT_LENGTH_SIP_PASSWORD'))
end
def create
@@ -39,13 +39,13 @@ class SipAccountsController < ApplicationController
if @sip_account.auth_name.blank?
loop do
- @sip_account.auth_name = SecureRandom.hex(DEFAULT_LENGTH_SIP_AUTH_NAME)
+ @sip_account.auth_name = SecureRandom.hex(GsParameter.get('DEFAULT_LENGTH_SIP_AUTH_NAME'))
break unless SipAccount.exists?(:auth_name => @sip_account.auth_name)
end
end
if @sip_account.password.blank?
- @sip_account.password = SecureRandom.hex(DEFAULT_LENGTH_SIP_PASSWORD)
+ @sip_account.password = SecureRandom.hex(GsParameter.get('DEFAULT_LENGTH_SIP_PASSWORD'))
end
if @sip_account.save
diff --git a/app/controllers/voicemail_messages_controller.rb b/app/controllers/voicemail_messages_controller.rb
index 58f5265..dfe0ae4 100644
--- a/app/controllers/voicemail_messages_controller.rb
+++ b/app/controllers/voicemail_messages_controller.rb
@@ -24,17 +24,17 @@ class VoicemailMessagesController < ApplicationController
if @type == 'read'
@voicemail_messages = @sip_account.voicemail_messages.where('read_epoch > 0').order('created_epoch DESC').paginate(
:page => @pagination_page_number,
- :per_page => DEFAULT_PAGINATION_ENTRIES_PER_PAGE
+ :per_page => GsParameter.get('DEFAULT_PAGINATION_ENTRIES_PER_PAGE')
)
elsif @type == 'unread'
@voicemail_messages = @sip_account.voicemail_messages.where(:read_epoch => 0).order('created_epoch DESC').paginate(
:page => @pagination_page_number,
- :per_page => DEFAULT_PAGINATION_ENTRIES_PER_PAGE
+ :per_page => GsParameter.get('DEFAULT_PAGINATION_ENTRIES_PER_PAGE')
)
else
@voicemail_messages = @sip_account.voicemail_messages.order('created_epoch DESC').paginate(
:page => @pagination_page_number,
- :per_page => DEFAULT_PAGINATION_ENTRIES_PER_PAGE
+ :per_page => GsParameter.get('DEFAULT_PAGINATION_ENTRIES_PER_PAGE')
)
end
end
diff --git a/app/mailers/notifications.rb b/app/mailers/notifications.rb
index 2c7f2ce..5b46f23 100644
--- a/app/mailers/notifications.rb
+++ b/app/mailers/notifications.rb
@@ -26,7 +26,7 @@ class Notifications < ActionMailer::Base
@pin[:pin] = conference.pin
@pin[:phone_numbers] = conference.phone_numbers.join(', ')
- mail(from: Tenant.find(DEFAULT_API_TENANT_ID).from_field_pin_change_email,to: "#{conference.conferenceable.email}", :subject => "Conference PIN changed: #{@pin[:conference]}")
+ mail(from: Tenant.find(GsParameter.get('DEFAULT_API_TENANT_ID')).from_field_pin_change_email,to: "#{conference.conferenceable.email}", :subject => "Conference PIN changed: #{@pin[:conference]}")
end
def new_password(user, password)
@@ -39,7 +39,7 @@ class Notifications < ActionMailer::Base
@message[:greeting] = user.user_name
end
- mail(from: Tenant.find(DEFAULT_API_TENANT_ID).from_field_pin_change_email, to: "#{user.email}", :subject => "Password recovery")
+ mail(from: Tenant.find(GsParameter.get('DEFAULT_API_TENANT_ID')).from_field_pin_change_email, to: "#{user.email}", :subject => "Password recovery")
end
def new_voicemail(freeswitch_voicemail_msg, attach_file = false)
@@ -67,7 +67,7 @@ class Notifications < ActionMailer::Base
attachments["#{Time.at(freeswitch_voicemail_msg.created_epoch).getlocal.strftime('%Y%m%d-%H%M%S')}-#{caller_number}.wav"] = File.read(freeswitch_voicemail_msg.file_path)
end
- mail(from: Tenant.find(DEFAULT_API_TENANT_ID).from_field_voicemail_email, to: "#{user.email}", :subject => "New Voicemail from #{@voicemail[:from]}, received #{Time.at(freeswitch_voicemail_msg.created_epoch).getlocal.to_s}")
+ mail(from: Tenant.find(GsParameter.get('DEFAULT_API_TENANT_ID')).from_field_voicemail_email, to: "#{user.email}", :subject => "New Voicemail from #{@voicemail[:from]}, received #{Time.at(freeswitch_voicemail_msg.created_epoch).getlocal.to_s}")
end
def new_fax(fax_document)
@@ -104,7 +104,7 @@ class Notifications < ActionMailer::Base
end
end
attachments["#{fax_document.created_at.strftime('%Y%m%d-%H%M%S')}-#{caller_number}.pdf"] = File.read(fax_document.document.path)
- mail(from: Tenant.find(DEFAULT_API_TENANT_ID).from_field_voicemail_email, to: "#{fax_account.email}", :subject => "New Fax Document from #{@fax[:from]}, received #{fax_document.created_at}")
+ mail(from: Tenant.find(GsParameter.get('DEFAULT_API_TENANT_ID')).from_field_voicemail_email, to: "#{fax_account.email}", :subject => "New Fax Document from #{@fax[:from]}, received #{fax_document.created_at}")
end
end
diff --git a/app/models/ability.rb b/app/models/ability.rb
index d9ec74a..f4068ca 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -70,7 +70,7 @@ class Ability
# Dirty hack to disable PhoneNumberRange in the GUI
#
- if STRICT_INTERNAL_EXTENSION_HANDLING == false
+ if GsParameter.get('STRICT_INTERNAL_EXTENSION_HANDLING') == false
cannot :manage, PhoneNumberRange
end
else
diff --git a/app/models/access_authorization.rb b/app/models/access_authorization.rb
index ef33115..878799a 100644
--- a/app/models/access_authorization.rb
+++ b/app/models/access_authorization.rb
@@ -18,7 +18,9 @@ class AccessAuthorization < ActiveRecord::Base
:allow_nil => true, :allow_blank => true,
:message => "must be numeric."
- validates_length_of :pin, :minimum => MINIMUM_PIN_LENGTH, :maximum => MAXIMUM_PIN_LENGTH,
+ validates_length_of :pin,
+ :minimum => (GsParameter.get('MINIMUM_PIN_LENGTH').nil? ? 4 : GsParameter.get('MINIMUM_PIN_LENGTH')),
+ :maximum => (GsParameter.get('MAXIMUM_PIN_LENGTH').nil? ? 10 : GsParameter.get('MAXIMUM_PIN_LENGTH')),
:allow_nil => true, :allow_blank => true
has_many :phone_numbers, :as => :phone_numberable, :dependent => :destroy
diff --git a/app/models/api/row.rb b/app/models/api/row.rb
index ac35516..e82a3e2 100644
--- a/app/models/api/row.rb
+++ b/app/models/api/row.rb
@@ -28,7 +28,7 @@ class Api::Row < ActiveRecord::Base
end
def create_a_new_gemeinschaft_user
- tenant = Tenant.find(DEFAULT_API_TENANT_ID)
+ tenant = Tenant.find(GsParameter.get('DEFAULT_API_TENANT_ID'))
# Find or create the user
#
diff --git a/app/models/call_forward.rb b/app/models/call_forward.rb
index 0018cfb..8a8d1df 100644
--- a/app/models/call_forward.rb
+++ b/app/models/call_forward.rb
@@ -28,7 +28,7 @@ class CallForward < ActiveRecord::Base
validates_numericality_of :depth,
:only_integer => true,
:greater_than_or_equal_to => 1,
- :less_than_or_equal_to => MAX_CALL_FORWARD_DEPTH
+ :less_than_or_equal_to => (GsParameter.get('MAX_CALL_FORWARD_DEPTH').nil? ? 0 : GsParameter.get('MAX_CALL_FORWARD_DEPTH'))
before_validation {
self.timeout = nil if self.call_forward_case_id != 3
diff --git a/app/models/conference.rb b/app/models/conference.rb
index 8be9f21..16b646c 100644
--- a/app/models/conference.rb
+++ b/app/models/conference.rb
@@ -15,7 +15,7 @@ class Conference < ActiveRecord::Base
validates_presence_of :max_members
validates_numericality_of :max_members, :only_integer => true,
:greater_than => 0,
- :less_than => (MAXIMUM_NUMBER_OF_PEOPLE_IN_A_CONFERENCE + 1),
+ :less_than => ((GsParameter.get('MAXIMUM_NUMBER_OF_PEOPLE_IN_A_CONFERENCE').nil? ? 10 : GsParameter.get('MAXIMUM_NUMBER_OF_PEOPLE_IN_A_CONFERENCE')) + 1),
:allow_nil => false,
:allow_blank => false
@@ -25,7 +25,7 @@ class Conference < ActiveRecord::Base
:greater_than => 0,
:allow_nil => true,
:allow_blank => true
- validates_length_of :pin, :minimum => MINIMUM_PIN_LENGTH,
+ validates_length_of :pin, :minimum => (GsParameter.get('MINIMUM_PIN_LENGTH').nil? ? 4 : GsParameter.get('MINIMUM_PIN_LENGTH')),
:allow_nil => true,
:allow_blank => true
diff --git a/app/models/conference_invitee.rb b/app/models/conference_invitee.rb
index 7de20de..d6e3bac 100644
--- a/app/models/conference_invitee.rb
+++ b/app/models/conference_invitee.rb
@@ -13,7 +13,7 @@ class ConferenceInvitee < ActiveRecord::Base
:greater_than => 0,
:allow_nil => true,
:allow_blank => true
- validates_length_of :pin, :minimum => MINIMUM_PIN_LENGTH,
+ validates_length_of :pin, :minimum => (GsParameter.get('MINIMUM_PIN_LENGTH').nil? ? 4 : GsParameter.get('MINIMUM_PIN_LENGTH')),
:allow_nil => true,
:allow_blank => true
diff --git a/app/models/fax_document.rb b/app/models/fax_document.rb
index 67bdea9..080bdaa 100644
--- a/app/models/fax_document.rb
+++ b/app/models/fax_document.rb
@@ -54,7 +54,7 @@ class FaxDocument < ActiveRecord::Base
private
def render_thumbnails
- directory = "/tmp/GS-#{GEMEINSCHAFT_VERSION}/fax_thumbnails/#{self.id}"
+ directory = "/tmp/GS-#{GsParameter.get('GEMEINSCHAFT_VERSION')}/fax_thumbnails/#{self.id}"
system('mkdir -p ' + directory)
system("cd #{directory} && convert #{Rails.root.to_s}/public#{self.document.to_s}[0-100] -colorspace Gray PNG:'fax_page.png'")
number_of_thumbnails = Dir["#{directory}/fax_page-*.png"].count
@@ -70,7 +70,7 @@ class FaxDocument < ActiveRecord::Base
def convert_pdf_to_tiff
page_size_a4 = '595 842'
page_size_command = "<< /Policies << /PageSize 3 >> /InputAttributes currentpagedevice /InputAttributes get dup { pop 1 index exch undef } forall dup 0 << /PageSize [ #{page_size_a4} ] >> put >> setpagedevice"
- directory = "/tmp/GS-#{GEMEINSCHAFT_VERSION}/faxes/#{self.id}"
+ directory = "/tmp/GS-#{GsParameter.get('GEMEINSCHAFT_VERSION')}/faxes/#{self.id}"
system('mkdir -p ' + directory)
tiff_file_name = File.basename(self.document.to_s.downcase, ".pdf") + '.tiff'
system "cd #{directory} && gs -q -r#{self.fax_resolution.resolution_value} -dNOPAUSE -dBATCH -dSAFER -sDEVICE=tiffg3 -sOutputFile=\"#{tiff_file_name}\" -c \"#{page_size_command}\" -- \"#{Rails.root.to_s}/public#{self.document.to_s}\""
diff --git a/app/models/gs_cluster_sync_log_entry.rb b/app/models/gs_cluster_sync_log_entry.rb
index 063ff23..51e3b05 100644
--- a/app/models/gs_cluster_sync_log_entry.rb
+++ b/app/models/gs_cluster_sync_log_entry.rb
@@ -15,7 +15,7 @@ class GsClusterSyncLogEntry < ActiveRecord::Base
after_create :apply_to_local_database
def apply_to_local_database
- if self.homebase_ip_address != HOMEBASE_IP_ADDRESS
+ if self.homebase_ip_address != GsParameter.get('HOMEBASE_IP_ADDRESS')
if self.class_name.constantize.new.attribute_names.include?('is_native')
case self.action
when 'create'
@@ -84,7 +84,7 @@ class GsClusterSyncLogEntry < ActiveRecord::Base
end
def populate_other_cluster_nodes
- if self.homebase_ip_address == HOMEBASE_IP_ADDRESS && self.waiting_to_be_synced == true
+ if self.homebase_ip_address == GsParameter.get('HOMEBASE_IP_ADDRESS') && self.waiting_to_be_synced == true
if GsNode.where(:push_updates_to => true).count > 0
GsNode.where(:push_updates_to => true).each do |gs_node|
RemoteGsNode::GsClusterSyncLogEntry.site = gs_node.site
diff --git a/app/models/gs_parameter.rb b/app/models/gs_parameter.rb
index 8e30583..9d9e996 100644
--- a/app/models/gs_parameter.rb
+++ b/app/models/gs_parameter.rb
@@ -12,16 +12,23 @@ class GsParameter < ActiveRecord::Base
:presence => true,
:inclusion => { :in => ['String', 'Integer', 'Boolean', 'YAML'] }
- def generate_constant
- Kernel.const_set(self.name, self.value.to_i) if self.class_type == 'Integer'
- Kernel.const_set(self.name, self.value.to_s) if self.class_type == 'String'
-
- if self.class_type == 'Boolean'
- Kernel.const_set(self.name, true) if self.value == 'true'
- Kernel.const_set(self.name, false) if self.value == 'false'
+ def self.get(wanted_variable)
+ if GsParameter.table_exists?
+ item = GsParameter.where(:name => wanted_variable).first
+ if item.nil?
+ return nil
+ else
+ return item.value.to_i if item.class_type == 'Integer'
+ return item.value.to_s if item.class_type == 'String'
+ if item.class_type == 'Boolean'
+ return true if item.value == 'true'
+ return false if item.value == 'false'
+ end
+ return YAML.load(item.value) if item.class_type == 'YAML'
+ end
+ else
+ nil
end
-
- Kernel.const_set(self.name, YAML.load(self.value)) if self.class_type == 'YAML'
end
def to_s
diff --git a/app/models/hunt_group.rb b/app/models/hunt_group.rb
index 276ae53..184297c 100644
--- a/app/models/hunt_group.rb
+++ b/app/models/hunt_group.rb
@@ -8,17 +8,17 @@ class HuntGroup < ActiveRecord::Base
:allow_nil => true, :allow_blank => true
validates_presence_of :strategy
- validates_inclusion_of :strategy, :in => HUNT_GROUP_STRATEGIES
+ validates_inclusion_of :strategy, :in => (GsParameter.get('HUNT_GROUP_STRATEGIES').nil? ? [] : GsParameter.get('HUNT_GROUP_STRATEGIES'))
validates_presence_of :seconds_between_jumps,
:if => Proc.new{ |hunt_group| hunt_group.strategy != 'ring_all' }
validates_numericality_of :seconds_between_jumps,
:only_integer => true,
- :greater_than_or_equal_to => VALID_SECONDS_BETWEEN_JUMPS_VALUES.min,
- :less_than_or_equal_to => VALID_SECONDS_BETWEEN_JUMPS_VALUES.max,
+ :greater_than_or_equal_to => (GsParameter.get('VALID_SECONDS_BETWEEN_JUMPS_VALUES').nil? ? 2 : GsParameter.get('VALID_SECONDS_BETWEEN_JUMPS_VALUES').min),
+ :less_than_or_equal_to => (GsParameter.get('VALID_SECONDS_BETWEEN_JUMPS_VALUES').nil? ? 120 : GsParameter.get('VALID_SECONDS_BETWEEN_JUMPS_VALUES').max),
:if => Proc.new{ |hunt_group| hunt_group.strategy != 'ring_all' }
validates_inclusion_of :seconds_between_jumps,
- :in => VALID_SECONDS_BETWEEN_JUMPS_VALUES,
+ :in => (GsParameter.get('VALID_SECONDS_BETWEEN_JUMPS_VALUES').nil? ? [] : GsParameter.get('VALID_SECONDS_BETWEEN_JUMPS_VALUES')),
:if => Proc.new{ |hunt_group| hunt_group.strategy != 'ring_all' }
validates_inclusion_of :seconds_between_jumps,
:in => [nil],
diff --git a/app/models/phone_number.rb b/app/models/phone_number.rb
index 4c0cf46..d1e950f 100644
--- a/app/models/phone_number.rb
+++ b/app/models/phone_number.rb
@@ -18,8 +18,8 @@ class PhoneNumber < ActiveRecord::Base
before_save :save_value_of_to_s
after_create :copy_existing_call_forwards_if_necessary
before_validation :'parse_and_split_number!'
- validate :validate_number, :if => Proc.new { |phone_number| STRICT_INTERNAL_EXTENSION_HANDLING && STRICT_DID_HANDLING }
- validate :check_if_number_is_available, :if => Proc.new { |phone_number| STRICT_INTERNAL_EXTENSION_HANDLING && STRICT_DID_HANDLING }
+ validate :validate_number, :if => Proc.new { |phone_number| GsParameter.get('STRICT_INTERNAL_EXTENSION_HANDLING') && GsParameter.get('STRICT_DID_HANDLING') }
+ validate :check_if_number_is_available, :if => Proc.new { |phone_number| GsParameter.get('STRICT_INTERNAL_EXTENSION_HANDLING') && GsParameter.get('STRICT_DID_HANDLING') }
acts_as_list :scope => [:phone_numberable_id, :phone_numberable_type]
@@ -95,7 +95,7 @@ class PhoneNumber < ActiveRecord::Base
else
# Check if the number is an internal extension.
if tenant
- internal_extension_range = tenant.phone_number_ranges.where(:name => INTERNAL_EXTENSIONS).first
+ internal_extension_range = tenant.phone_number_ranges.where(:name => GsParameter.get('INTERNAL_EXTENSIONS')).first
if internal_extension_range
if internal_extension_range.phone_numbers.where(:number => number).length > 0
parts[:extension] = number
@@ -192,8 +192,8 @@ class PhoneNumber < ActiveRecord::Base
end
def parse_and_split_number!
- if self.phone_numberable_type == 'PhoneNumberRange' && self.phone_numberable.name == INTERNAL_EXTENSIONS
- # The parent is the PhoneNumberRange INTERNAL_EXTENSIONS. Therefor it must be an extensions.
+ if self.phone_numberable_type == 'PhoneNumberRange' && self.phone_numberable.name == GsParameter.get('INTERNAL_EXTENSIONS')
+ # The parent is the PhoneNumberRange GsParameter.get('INTERNAL_EXTENSIONS'). Therefor it must be an extensions.
#
self.country_code = nil
self.area_code = nil
@@ -202,8 +202,8 @@ class PhoneNumber < ActiveRecord::Base
self.extension = self.number.to_s.strip
else
if self.tenant &&
- self.tenant.phone_number_ranges.exists?(:name => INTERNAL_EXTENSIONS) &&
- self.tenant.phone_number_ranges.where(:name => INTERNAL_EXTENSIONS).first.phone_numbers.exists?(:number => self.number)
+ self.tenant.phone_number_ranges.exists?(:name => GsParameter.get('INTERNAL_EXTENSIONS')) &&
+ self.tenant.phone_number_ranges.where(:name => GsParameter.get('INTERNAL_EXTENSIONS')).first.phone_numbers.exists?(:number => self.number)
self.country_code = nil
self.area_code = nil
self.subscriber_number = nil
@@ -263,7 +263,7 @@ class PhoneNumber < ActiveRecord::Base
if self.phone_numberable_type != 'PhoneBookEntry' && self.tenant
phone_number_ranges = self.tenant.phone_number_ranges.where(
- :name => [INTERNAL_EXTENSIONS, DIRECT_INWARD_DIALING_NUMBERS]
+ :name => [GsParameter.get('INTERNAL_EXTENSIONS'), GsParameter.get('DIRECT_INWARD_DIALING_NUMBERS')]
)
if !phone_number_ranges.empty?
if !PhoneNumber.where(:phone_numberable_type => 'PhoneNumberRange').
diff --git a/app/models/phone_number_range.rb b/app/models/phone_number_range.rb
index 2fdd9b6..b666487 100644
--- a/app/models/phone_number_range.rb
+++ b/app/models/phone_number_range.rb
@@ -6,7 +6,7 @@ class PhoneNumberRange < ActiveRecord::Base
validates_presence_of :name
validates_uniqueness_of :name, :scope => [:phone_number_rangeable_id, :phone_number_rangeable_type]
- validates_inclusion_of :name, :in => [INTERNAL_EXTENSIONS, DIRECT_INWARD_DIALING_NUMBERS, SERVICE_NUMBERS]
+ validates_inclusion_of :name, :in => [GsParameter.get('INTERNAL_EXTENSIONS'), GsParameter.get('DIRECT_INWARD_DIALING_NUMBERS'), GsParameter.get('SERVICE_NUMBERS')]
validates_presence_of :phone_number_rangeable_id
validates_presence_of :phone_number_rangeable
diff --git a/app/models/sip_account.rb b/app/models/sip_account.rb
index 8459265..5388395 100644
--- a/app/models/sip_account.rb
+++ b/app/models/sip_account.rb
@@ -71,7 +71,7 @@ class SipAccount < ActiveRecord::Base
after_update :log_out_phone_if_not_local
def to_s
- truncate((self.caller_name || "SipAccount ID #{self.id}"), :length => TO_S_MAX_CALLER_NAME_LENGTH) + " (#{truncate(self.auth_name, :length => TO_S_MAX_LENGTH_OF_AUTH_NAME)}@...#{self.host.split(/\./)[2,3].to_a.join('.') if self.host })"
+ truncate((self.caller_name || "SipAccount ID #{self.id}"), :length => GsParameter.get('TO_S_MAX_CALLER_NAME_LENGTH')) + " (#{truncate(self.auth_name, :length => GsParameter.get('TO_S_MAX_LENGTH_OF_AUTH_NAME'))}@...#{self.host.split(/\./)[2,3].to_a.join('.') if self.host })"
end
def call_forwarding_toggle( call_forwarding_service, to_voicemail = nil )
@@ -200,7 +200,7 @@ class SipAccount < ActiveRecord::Base
# log out phone if sip_account is not on this node
def log_out_phone_if_not_local
- if self.gs_node_id && ! GsNode.where(:ip_address => HOMEBASE_IP_ADDRESS, :id => self.gs_node_id).first
+ if self.gs_node_id && ! GsNode.where(:ip_address => GsParameter.get('HOMEBASE_IP_ADDRESS'), :id => self.gs_node_id).first
self.phones.each do |phone|
phone.user_logout;
end
diff --git a/app/models/tenant.rb b/app/models/tenant.rb
index d9351b7..c3e2926 100644
--- a/app/models/tenant.rb
+++ b/app/models/tenant.rb
@@ -3,11 +3,11 @@
class Tenant < ActiveRecord::Base
attr_accessible :name, :description, :sip_domain_id, :country_id, :language_id, :from_field_pin_change_email, :from_field_voicemail_email
- if STRICT_INTERNAL_EXTENSION_HANDLING == true
+ if GsParameter.get('STRICT_INTERNAL_EXTENSION_HANDLING') == true
attr_accessible :internal_extension_ranges
end
- if STRICT_DID_HANDLING == true
+ if GsParameter.get('STRICT_DID_HANDLING') == true
attr_accessible :did_list
end
@@ -93,7 +93,7 @@ class Tenant < ActiveRecord::Base
name
end
- if STRICT_INTERNAL_EXTENSION_HANDLING == true
+ if GsParameter.get('STRICT_INTERNAL_EXTENSION_HANDLING') == true
def array_of_internal_extension_numbers
ranges = self.internal_extension_ranges.gsub(/[^0-9\-,]/,'').gsub(/[\-]+/,'-').gsub(/[,]+/,',').split(/,/)
output = []
@@ -112,7 +112,7 @@ class Tenant < ActiveRecord::Base
# Generate the internal_extensions
#
def generate_internal_extensions
- internal_extensions = self.phone_number_ranges.find_or_create_by_name(INTERNAL_EXTENSIONS, :description => 'A list of all available internal extensions.')
+ internal_extensions = self.phone_number_ranges.find_or_create_by_name(GsParameter.get('INTERNAL_EXTENSIONS'), :description => 'A list of all available internal extensions.')
phone_number_list = Array.new
@@ -122,7 +122,7 @@ class Tenant < ActiveRecord::Base
elsif
# Don't create extensions like 911, 110 or 112 (at least by default)
#
- phone_number_list = (self.array_of_internal_extension_numbers - self.country.phone_number_ranges.where(:name => SERVICE_NUMBERS).first.phone_numbers.map{|entry| entry.number})
+ phone_number_list = (self.array_of_internal_extension_numbers - self.country.phone_number_ranges.where(:name => GsParameter.get('SERVICE_NUMBERS')).first.phone_numbers.map{|entry| entry.number})
end
end
@@ -133,7 +133,7 @@ class Tenant < ActiveRecord::Base
end
- if STRICT_DID_HANDLING == true
+ if GsParameter.get('STRICT_DID_HANDLING') == true
def array_of_dids_generated_from_did_list
numbers = self.did_list.downcase.gsub(/[^0-9,x\+]/,'').gsub(/[,]+/,',').split(/,/)
array_of_all_external_numbers = []
@@ -152,7 +152,7 @@ class Tenant < ActiveRecord::Base
# Generate the external numbers (DIDs)
#
def generate_dids
- dids = self.phone_number_ranges.find_or_create_by_name(DIRECT_INWARD_DIALING_NUMBERS, :description => 'A list of all available DIDs.')
+ dids = self.phone_number_ranges.find_or_create_by_name(GsParameter.get('DIRECT_INWARD_DIALING_NUMBERS'), :description => 'A list of all available DIDs.')
self.array_of_dids_generated_from_did_list.each do |number|
dids.phone_numbers.find_or_create_by_name_and_number('DID', number)
end
@@ -167,7 +167,7 @@ class Tenant < ActiveRecord::Base
@internal_extensions_and_dids ||= self.phone_number_ranges_phone_numbers.
where(:phone_numberable_type => 'PhoneNumberRange').
where(:phone_numberable_id => self.phone_number_ranges.
- where(:name => [INTERNAL_EXTENSIONS, DIRECT_INWARD_DIALING_NUMBERS]).
+ where(:name => [GsParameter.get('INTERNAL_EXTENSIONS'), GsParameter.get('DIRECT_INWARD_DIALING_NUMBERS')]).
map{|pnr| pnr.id })
end
@@ -175,7 +175,7 @@ class Tenant < ActiveRecord::Base
@array_of_internal_extensions ||= self.phone_number_ranges_phone_numbers.
where(:phone_numberable_type => 'PhoneNumberRange').
where(:phone_numberable_id => self.phone_number_ranges.
- where(:name => INTERNAL_EXTENSIONS).
+ where(:name => GsParameter.get('INTERNAL_EXTENSIONS')).
map{|pnr| pnr.id }).
map{|phone_number| phone_number.number }.
sort.uniq
@@ -184,7 +184,7 @@ class Tenant < ActiveRecord::Base
def array_of_dids
@array_of_dids ||= self.phone_number_ranges_phone_numbers.
where(:phone_numberable_type => 'PhoneNumberRange').
- where(:phone_numberable_id => self.phone_number_ranges.where(:name => DIRECT_INWARD_DIALING_NUMBERS).map{|pnr| pnr.id }).
+ where(:phone_numberable_id => self.phone_number_ranges.where(:name => GsParameter.get('DIRECT_INWARD_DIALING_NUMBERS')).map{|pnr| pnr.id }).
map{|phone_number| phone_number.to_s }.
sort.uniq
end
@@ -215,7 +215,7 @@ class Tenant < ActiveRecord::Base
# Create a public phone book for this tenant
def create_a_default_phone_book
- if self.name != SUPER_TENANT_NAME
+ if self.name != GsParameter.get('SUPER_TENANT_NAME')
general_phone_book = self.phone_books.find_or_create_by_name_and_description(
I18n.t('phone_books.general_phone_book.name'),
I18n.t('phone_books.general_phone_book.description', :resource => self.to_s)
diff --git a/app/models/user.rb b/app/models/user.rb
index 2d0256f..9b29dc5 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -27,7 +27,8 @@ class User < ActiveRecord::Base
}
validates_length_of [:new_pin, :new_pin_confirmation],
- :minimum => MINIMUM_PIN_LENGTH, :maximum => MAXIMUM_PIN_LENGTH,
+ :minimum => (GsParameter.get('MINIMUM_PIN_LENGTH').nil? ? 4 : GsParameter.get('MINIMUM_PIN_LENGTH')),
+ :maximum => (GsParameter.get('MAXIMUM_PIN_LENGTH').nil? ? 10 : GsParameter.get('MAXIMUM_PIN_LENGTH')),
:allow_blank => true, :allow_nil => true
validates_format_of [:new_pin, :new_pin_confirmation],
:with => /^[0-9]+$/,
diff --git a/app/views/call_forwards/_form_core.html.haml b/app/views/call_forwards/_form_core.html.haml
index f75181f..b751fb3 100644
--- a/app/views/call_forwards/_form_core.html.haml
+++ b/app/views/call_forwards/_form_core.html.haml
@@ -9,7 +9,7 @@
= f.input :source, :label => t('call_forwards.form.source.label'), :hint => conditional_hint('call_forwards.form.source.hint')
- if GuiFunction.display?('depth_field_in_call_forward_form', current_user)
- = f.input :depth, :collection => 1..MAX_CALL_FORWARD_DEPTH, :label => t('call_forwards.form.depth.label'), :hint => conditional_hint('call_forwards.form.depth.hint')
+ = f.input :depth, :collection => 1..GsParameter.get('MAX_CALL_FORWARD_DEPTH'), :label => t('call_forwards.form.depth.label'), :hint => conditional_hint('call_forwards.form.depth.hint')
- else
= f.hidden_field :depth
= f.input :active, :label => t('call_forwards.form.active.label'), :hint => conditional_hint('call_forwards.form.active.hint')
diff --git a/app/views/callthroughs/_form_core.html.haml b/app/views/callthroughs/_form_core.html.haml
index 1f137d9..cf05e06 100644
--- a/app/views/callthroughs/_form_core.html.haml
+++ b/app/views/callthroughs/_form_core.html.haml
@@ -15,7 +15,7 @@
= f.simple_fields_for :access_authorizations do |access_authorization|
= render "access_authorizations/form_core", :f => access_authorization
- - if CALLTHROUGH_HAS_WHITELISTS == true
+ - if GsParameter.get('CALLTHROUGH_HAS_WHITELISTS') == true
- if @callthrough && @callthrough.whitelists.size > 0
%h2= t('callthroughs.form.whitelists.label')
- if !t('callthroughs.form.whitelists.hint').blank?
diff --git a/app/views/callthroughs/_index_core.html.haml b/app/views/callthroughs/_index_core.html.haml
index f1802d4..2071145 100644
--- a/app/views/callthroughs/_index_core.html.haml
+++ b/app/views/callthroughs/_index_core.html.haml
@@ -3,7 +3,7 @@
%th= t('callthroughs.index.name')
%th= t('callthroughs.index.phone_numbers')
%th= t('callthroughs.index.access_authorized_phone_numbers')
- - if CALLTHROUGH_HAS_WHITELISTS == true
+ - if GsParameter.get('CALLTHROUGH_HAS_WHITELISTS') == true
%th= t('callthroughs.index.whitelist_phone_numbers')
- reset_cycle
@@ -12,6 +12,6 @@
%td= callthrough.name
%td=render 'phone_numbers/listing', :phone_numbers => callthrough.phone_numbers
%td=render 'phone_numbers/listing', :phone_numbers => callthrough.access_authorization_phone_numbers
- - if CALLTHROUGH_HAS_WHITELISTS == true
+ - if GsParameter.get('CALLTHROUGH_HAS_WHITELISTS') == true
%td=render 'phone_numbers/listing', :phone_numbers => callthrough.whitelisted_phone_numbers
=render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => callthrough.tenant, :child => callthrough} \ No newline at end of file
diff --git a/app/views/callthroughs/show.html.haml b/app/views/callthroughs/show.html.haml
index 55bd6eb..b9abca9 100644
--- a/app/views/callthroughs/show.html.haml
+++ b/app/views/callthroughs/show.html.haml
@@ -19,7 +19,7 @@
%br
= render :partial => 'shared/create_link', :locals => {:parent => @callthrough, :child_class => AccessAuthorization}
-- if CALLTHROUGH_HAS_WHITELISTS == true
+- if GsParameter.get('CALLTHROUGH_HAS_WHITELISTS') == true
%h2= t('callthroughs.form.whitelists.label')
- if @callthrough.whitelisted_phone_numbers.count > 0
= render 'whitelists/index_core', :whitelists => @callthrough.whitelists
diff --git a/app/views/conferences/_form_core.html.haml b/app/views/conferences/_form_core.html.haml
index 04754de..f8d6c8e 100644
--- a/app/views/conferences/_form_core.html.haml
+++ b/app/views/conferences/_form_core.html.haml
@@ -5,7 +5,7 @@
= f.input :end, :label => t('conferences.form.end.label'), :hint => conditional_hint('conferences.form.end.hint'), :include_blank => true, :start_year => Time.now.year, :end_year => Time.now.year + 2
= f.input :description, :label => t('conferences.form.description.label'), :hint => conditional_hint('conferences.form.description.hint')
= f.input :pin, :label => t('conferences.form.pin.label'), :hint => conditional_hint('conferences.form.pin.hint')
- = f.input :max_members, :collection => 1..MAXIMUM_NUMBER_OF_PEOPLE_IN_A_CONFERENCE, :include_blank => false, :label => t('conferences.form.max_members.label'), :hint => conditional_hint('conferences.form.max_members.hint')
+ = f.input :max_members, :collection => 1..GsParameter.get('MAXIMUM_NUMBER_OF_PEOPLE_IN_A_CONFERENCE'), :include_blank => false, :label => t('conferences.form.max_members.label'), :hint => conditional_hint('conferences.form.max_members.hint')
= f.input :open_for_anybody, :label => t('conferences.form.open_for_anybody.label'), :hint => conditional_hint('conferences.form.open_for_anybody.hint')
= f.input :announce_new_member_by_name, :label => t('conferences.form.announce_new_member_by_name.label'), :hint => conditional_hint('conferences.form.announce_new_member_by_name.hint')
= f.input :announce_left_member_by_name, :label => t('conferences.form.announce_left_member_by_name.label'), :hint => conditional_hint('conferences.form.announce_left_member_by_name.hint') \ No newline at end of file
diff --git a/app/views/config_snom/show.xml.haml b/app/views/config_snom/show.xml.haml
index a11715d..5f53802 100644
--- a/app/views/config_snom/show.xml.haml
+++ b/app/views/config_snom/show.xml.haml
@@ -48,8 +48,8 @@
%use_proxy_number_guessing{:perm => 'RW'}= 'off'
%guess_number{:perm => 'RW'}= 'off'
%guess_start_length{:perm => 'RW'}= '3'
- %ieee8021x_eap_md5_username{:perm => 'RW'}= PROVISIONING_IEEE8021X_EAP_USERNAME
- %ieee8021x_eap_md5_password{:perm => 'RW'}= PROVISIONING_IEEE8021X_EAP_PASSWORD
+ %ieee8021x_eap_md5_username{:perm => 'RW'}= GsParameter.get('PROVISIONING_IEEE8021X_EAP_USERNAME')
+ %ieee8021x_eap_md5_password{:perm => 'RW'}= GsParameter.get('PROVISIONING_IEEE8021X_EAP_PASSWORD')
- 0.upto(9) do |ringer_idx|
%internal_ringer_text{:idx => ringer_idx, :perm => 'RW'}= "Ringer#{(ringer_idx+1)}"
diff --git a/app/views/config_snom/state_settings.xml.haml b/app/views/config_snom/state_settings.xml.haml
index ac0e872..6be1efc 100644
--- a/app/views/config_snom/state_settings.xml.haml
+++ b/app/views/config_snom/state_settings.xml.haml
@@ -1,5 +1,5 @@
!!! XML
-%SnomIPPhoneMenu{:state => 'relevant', :title => "Gemeinschaft #{GEMEINSCHAFT_VERSION}"}
+%SnomIPPhoneMenu{:state => 'relevant', :title => "Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}"}
%MenuItem{:name => '$(lang:menu100_phone_book)'}
%URL= "#{@base_url}/#{@sip_account_ids.first}/phone_book.xml"
%Menu{:name => '$(lang:menu100_call_lists)'}
diff --git a/app/views/gemeinschaft_setups/new.de.html.haml b/app/views/gemeinschaft_setups/new.de.html.haml
index 5e79115..2e148f3 100644
--- a/app/views/gemeinschaft_setups/new.de.html.haml
+++ b/app/views/gemeinschaft_setups/new.de.html.haml
@@ -1,4 +1,4 @@
-- title "Konfiguration einer Gemeinschaft #{GEMEINSCHAFT_VERSION} Installation"
+- title "Konfiguration einer Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')} Installation"
= simple_form_for(@gemeinschaft_setup) do |f|
= f.error_notification
diff --git a/app/views/gemeinschaft_setups/new.html.haml b/app/views/gemeinschaft_setups/new.html.haml
index f5f0e81..ab5a70f 100644
--- a/app/views/gemeinschaft_setups/new.html.haml
+++ b/app/views/gemeinschaft_setups/new.html.haml
@@ -1,4 +1,4 @@
-- title "Configure a new Gemeinschaft #{GEMEINSCHAFT_VERSION} server"
+- title "Configure a new Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')} server"
= simple_form_for(@gemeinschaft_setup) do |f|
= f.error_notification
diff --git a/app/views/hunt_groups/_form_core.html.haml b/app/views/hunt_groups/_form_core.html.haml
index 10a0111..53d44d1 100644
--- a/app/views/hunt_groups/_form_core.html.haml
+++ b/app/views/hunt_groups/_form_core.html.haml
@@ -1,4 +1,4 @@
.inputs
= f.input :name, :label => t('hunt_groups.form.name.label'), :hint => conditional_hint('hunt_groups.form.name.hint')
- = f.input :strategy, :as => :select, :label => t('hunt_groups.form.strategy.label'), :hint => conditional_hint('hunt_groups.form.strategy.hint'), :include_blank => false, :collection => HUNT_GROUP_STRATEGIES.map {|x| [I18n.t('hunt_groups.strategies.' + x), x] }
- = f.input :seconds_between_jumps, :collection => VALID_SECONDS_BETWEEN_JUMPS_VALUES, :label => t('hunt_groups.form.seconds_between_jumps.label'), :hint => conditional_hint('hunt_groups.form.seconds_between_jumps.hint') \ No newline at end of file
+ = f.input :strategy, :as => :select, :label => t('hunt_groups.form.strategy.label'), :hint => conditional_hint('hunt_groups.form.strategy.hint'), :include_blank => false, :collection => GsParameter.get('HUNT_GROUP_STRATEGIES').map {|x| [I18n.t('hunt_groups.strategies.' + x), x] }
+ = f.input :seconds_between_jumps, :collection => GsParameter.get('VALID_SECONDS_BETWEEN_JUMPS_VALUES'), :label => t('hunt_groups.form.seconds_between_jumps.label'), :hint => conditional_hint('hunt_groups.form.seconds_between_jumps.hint') \ No newline at end of file
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 2c7faec..c1a56f2 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -33,7 +33,7 @@
%footer#main
%ul
%li
- %a{:href => "http://amooma.de/gemeinschaft/gs5"} Gemeinschaft #{GEMEINSCHAFT_VERSION}
+ %a{:href => "http://amooma.de/gemeinschaft/gs5"} Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}
- if GuiFunction.display?('amooma_commercial_support_link_in_footer', current_user)
%li
%a{:href => "http://amooma.de"} Kommerzieller Support und Consulting
diff --git a/app/views/page/beginners_intro.de.html.haml b/app/views/page/beginners_intro.de.html.haml
index 8d129db..4bd5b11 100644
--- a/app/views/page/beginners_intro.de.html.haml
+++ b/app/views/page/beginners_intro.de.html.haml
@@ -1,4 +1,4 @@
-- title "Erste Schritte mit Gemeinschaft #{GEMEINSCHAFT_VERSION}!"
+- title "Erste Schritte mit Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}!"
%p
Sie müssen als erstes mindestens zwei neue SIP-Accounts anlegen. Dabei haben Sie die Wahl zwischen folgenden Varianten:
@@ -29,5 +29,5 @@
%p
Komfortabler ist der Betrieb von im Provisioning unterstützen Telefone. Diese können Sie beim Anlegen direkt mit einem bestimmten SIP-Account verknüpfen. Danach müssen Sie nur noch die Provisioningdaten per Hand ins Telefon eintragen oder ein paar Einstellungen in Ihrem DHCP-Server vornehmen. Hilfe dazu finden Sie im #{link_to 'Wiki', 'https://github.com/amooma/GS5/wiki'} und der #{link_to 'Mailingliste', 'https://groups.google.com/group/gs5-users/'}.
%p
- Folgende Telefone werden in der Version #{GEMEINSCHAFT_VERSION} vom automatischen Provisioning unterstützt:
+ Folgende Telefone werden in der Version #{GsParameter.get('GEMEINSCHAFT_VERSION')} vom automatischen Provisioning unterstützt:
= nicely_joined_with_commata(PhoneModel.order(:name).map{|phone_model| "#{phone_model.to_s}"}) \ No newline at end of file
diff --git a/app/views/page/beginners_intro.html.haml b/app/views/page/beginners_intro.html.haml
index 6227142..08af174 100644
--- a/app/views/page/beginners_intro.html.haml
+++ b/app/views/page/beginners_intro.html.haml
@@ -1,4 +1,4 @@
-- title "First steps with Gemeinschaft #{GEMEINSCHAFT_VERSION}!"
+- title "First steps with Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}!"
%p
You have to create at least two new SIP accounts. You have the choice of two different versions:
@@ -29,5 +29,5 @@
%p
More comfortable is the use of auto provisioned phones. They can be linked to SIP accounts. After creating them in the WebGUI you have to set the Provisioning URL in the phone or setup your DHCP server to give them this data. You'll find help in our #{link_to 'Wiki', 'https://github.com/amooma/GS5/wiki'} or in our #{link_to 'mailinglist', 'https://groups.google.com/group/gs5-users/'}.
%p
- In version #{GEMEINSCHAFT_VERSION} the following phones can be used for provisioning:
+ In version #{GsParameter.get('GEMEINSCHAFT_VERSION')} the following phones can be used for provisioning:
= nicely_joined_with_commata(PhoneModel.order(:name).map{|phone_model| "#{phone_model.to_s}"}) \ No newline at end of file
diff --git a/app/views/page/index.de.html.haml b/app/views/page/index.de.html.haml
index 2928319..d5dd096 100644
--- a/app/views/page/index.de.html.haml
+++ b/app/views/page/index.de.html.haml
@@ -1,4 +1,4 @@
-- title "Gemeinschaft #{GEMEINSCHAFT_VERSION}"
+- title "Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}"
%div
%h3 Aktueller Mandant
diff --git a/app/views/page/index.html.haml b/app/views/page/index.html.haml
index 9621395..f55ab37 100644
--- a/app/views/page/index.html.haml
+++ b/app/views/page/index.html.haml
@@ -1,4 +1,4 @@
-- title "Gemeinschaft #{GEMEINSCHAFT_VERSION}"
+- title "Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}"
%div
%h3 Current tenant
diff --git a/app/views/phones/_form_core.html.haml b/app/views/phones/_form_core.html.haml
index e0c664b..b09ee35 100644
--- a/app/views/phones/_form_core.html.haml
+++ b/app/views/phones/_form_core.html.haml
@@ -9,7 +9,7 @@
:javascript
$(".fallback_sip_account_dropdown").hide()
- - if defined? NIGHTLY_REBOOT_OF_PHONES && NIGHTLY_REBOOT_OF_PHONES == true
+ - if defined? GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') && GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') == true
= f.input :nightly_reboot, :label => t('phones.form.nightly_reboot.label'), :hint => conditional_hint('phones.form.nightly_reboot.hint')
- if defined? PROVISIONING_KEY_LENGTH && PROVISIONING_KEY_LENGTH > 0
= f.input :provisioning_key_active, :label => t('phones.form.provisioning_key_active.label'), :hint => conditional_hint('phones.form.provisioning_key_active.hint')
diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml
index a7ee952..f20facd 100644
--- a/app/views/phones/show.html.haml
+++ b/app/views/phones/show.html.haml
@@ -16,7 +16,7 @@
%strong= t('phones.show.fallback_sip_account_id') + ":"
= @phone.fallback_sip_account
-- if defined? NIGHTLY_REBOOT_OF_PHONES && NIGHTLY_REBOOT_OF_PHONES == true
+- if defined? GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') && GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') == true
%p
%strong= t('phones.show.nightly_reboot') + ":"
= @phone.nightly_reboot
diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml
index b9b47d5..d125e58 100644
--- a/app/views/tenants/_admin_area.de.html.haml
+++ b/app/views/tenants/_admin_area.de.html.haml
@@ -102,10 +102,10 @@
= render "phone_books/index_core", :phone_books => @tenant.phone_books
= render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneBook}
-- if STRICT_INTERNAL_EXTENSION_HANDLING == true
+- if GsParameter.get('STRICT_INTERNAL_EXTENSION_HANDLING') == true
%h3= t('phone_number_ranges.index.page_title')
- - if @tenant.created_at > (Time.now - 15.minutes) && Delayed::Job.count > 0 && @tenant.phone_number_ranges.find_by_name(INTERNAL_EXTENSIONS).try(:phone_numbers).try(:count).to_i == 0
+ - if @tenant.created_at > (Time.now - 15.minutes) && Delayed::Job.count > 0 && @tenant.phone_number_ranges.find_by_name(GsParameter.get('INTERNAL_EXTENSIONS')).try(:phone_numbers).try(:count).to_i == 0
Der Mandant
= "\"#{@tenant}\""
wurde erst vor
@@ -114,5 +114,5 @@
= pluralize(Delayed::Job.count, 'Hintergrundprozesse')
\. Bitte warten Sie noch ein paar Minuten und laden anschließend diese Seite erneut.
- else
- =render 'phone_number_ranges/index_core', :phone_number_ranges => (@tenant.phone_number_ranges + @tenant.country.phone_number_ranges.where(:name => SERVICE_NUMBERS))
+ =render 'phone_number_ranges/index_core', :phone_number_ranges => (@tenant.phone_number_ranges + @tenant.country.phone_number_ranges.where(:name => GsParameter.get('SERVICE_NUMBERS')))
=render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneNumberRange}
diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml
index d648143..afd50b5 100644
--- a/app/views/tenants/_admin_area.html.haml
+++ b/app/views/tenants/_admin_area.html.haml
@@ -102,15 +102,15 @@
= render "phone_books/index_core", :phone_books => @tenant.phone_books
= render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneBook}
-- if STRICT_INTERNAL_EXTENSION_HANDLING == true
+- if GsParameter.get('STRICT_INTERNAL_EXTENSION_HANDLING') == true
%h3= t('phone_number_ranges.index.page_title')
- - if @tenant.created_at > (Time.now - 15.minutes) && Delayed::Job.count > 0 && @tenant.phone_number_ranges.find_by_name(INTERNAL_EXTENSIONS).try(:phone_numbers).try(:count).to_i == 0
+ - if @tenant.created_at > (Time.now - 15.minutes) && Delayed::Job.count > 0 && @tenant.phone_number_ranges.find_by_name(GsParameter.get('INTERNAL_EXTENSIONS')).try(:phone_numbers).try(:count).to_i == 0
This tenant was created
= distance_of_time_in_words_to_now(@tenant.created_at)
ago. There are still
= pluralize(Delayed::Job.count, 'background job')
not finished. This can take a couple of minutes. Please reload this page later.
- else
- =render 'phone_number_ranges/index_core', :phone_number_ranges => (@tenant.phone_number_ranges + @tenant.country.phone_number_ranges.where(:name => SERVICE_NUMBERS))
+ =render 'phone_number_ranges/index_core', :phone_number_ranges => (@tenant.phone_number_ranges + @tenant.country.phone_number_ranges.where(:name => GsParameter.get('SERVICE_NUMBERS')))
=render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneNumberRange}
diff --git a/app/views/tenants/_form.html.haml b/app/views/tenants/_form.html.haml
index 2ca8a69..1641e78 100644
--- a/app/views/tenants/_form.html.haml
+++ b/app/views/tenants/_form.html.haml
@@ -11,13 +11,13 @@
= f.input :from_field_voicemail_email, :label => t('tenants.form.from_field_voicemail_email.label'), :hint => conditional_hint('tenants.form.from_field_voicemail_email.hint')
= f.input :from_field_pin_change_email, :label => t('tenants.form.from_field_pin_change_email.label'), :hint => conditional_hint('tenants.form.from_field_pin_change_email.hint')
- - if STRICT_INTERNAL_EXTENSION_HANDLING == true || STRICT_DID_HANDLING == true
+ - if GsParameter.get('STRICT_INTERNAL_EXTENSION_HANDLING') == true || GsParameter.get('STRICT_DID_HANDLING') == true
%h2= t('tenants.form.phone_numbers')
%p= t('tenants.form.intro')
- - if STRICT_INTERNAL_EXTENSION_HANDLING == true
+ - if GsParameter.get('STRICT_INTERNAL_EXTENSION_HANDLING') == true
= f.input :internal_extension_ranges, :label => t('tenants.form.internal_extension_ranges.label'), :hint => conditional_hint('tenants.form.internal_extension_ranges.hint')
- - if STRICT_DID_HANDLING == true
+ - if GsParameter.get('STRICT_DID_HANDLING') == true
= f.input :did_list, :label => t('tenants.form.did_list.label'), :hint => conditional_hint('tenants.form.did_list.hint')
.actions