summaryrefslogtreecommitdiffstats
path: root/config/initializers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-28 12:00:45 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-28 12:00:45 +0000
commitbceaf8be94091ca331b820fdc68e4a3b10a831bd (patch)
tree48f7679c9e79dc9b5d1565f2ab24e2e8cd8270c7 /config/initializers
parent52986e8cd1bba6ad1c4e3e78fe5f1d8d3eb5d44f (diff)
downloadredmine-bceaf8be94091ca331b820fdc68e4a3b10a831bd.tar.gz
redmine-bceaf8be94091ca331b820fdc68e4a3b10a831bd.zip
Let the secret token be set in configuration.yml.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9567 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/30-redmine.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/initializers/30-redmine.rb b/config/initializers/30-redmine.rb
index 58972b023..11a248959 100644
--- a/config/initializers/30-redmine.rb
+++ b/config/initializers/30-redmine.rb
@@ -4,6 +4,12 @@ I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
require 'redmine'
+# Load the secret token from the Redmine configuration file
+secret = Redmine::Configuration['secret_token']
+if secret.present?
+ RedmineApp::Application.config.secret_token = secret
+end
+
Redmine::Plugin.load
unless Redmine::Configuration['mirror_plugins_assets_on_startup'] == false
Redmine::Plugin.mirror_assets