diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-12-20 09:44:28 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-12-20 09:44:28 +0000 |
commit | cf9bb2699fa146514b219e1fd3dce6e367f274ce (patch) | |
tree | ffe2c6f9760dd5ecb5b1b60f03dded9ec6c13166 /app/controllers/sys_controller.rb | |
parent | 4398386c48bb70e99e543cca166f704853d3c664 (diff) | |
download | redmine-cf9bb2699fa146514b219e1fd3dce6e367f274ce.tar.gz redmine-cf9bb2699fa146514b219e1fd3dce6e367f274ce.zip |
Adds on optional API key to repositories management controller and reposman.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3201 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/sys_controller.rb')
-rw-r--r-- | app/controllers/sys_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/sys_controller.rb b/app/controllers/sys_controller.rb index 5e74192a9..be88eb232 100644 --- a/app/controllers/sys_controller.rb +++ b/app/controllers/sys_controller.rb @@ -59,8 +59,8 @@ class SysController < ActionController::Base def check_enabled User.current = nil - unless Setting.sys_api_enabled? - render :nothing => 'Access denied. Repository management WS is disabled.', :status => 403 + unless Setting.sys_api_enabled? && params[:key].to_s == Setting.sys_api_key + render :text => 'Access denied. Repository management WS is disabled or key is invalid.', :status => 403 return false end end |