remove trailing white-spaces from mail handler controller source.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5838 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
7e308ae375
commit
5e36c24f66
@ -1,27 +1,27 @@
|
|||||||
# redMine - project management software
|
# Redmine - project management software
|
||||||
# Copyright (C) 2006-2008 Jean-Philippe Lang
|
# Copyright (C) 2006-2011 Jean-Philippe Lang
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# as published by the Free Software Foundation; either version 2
|
# as published by the Free Software Foundation; either version 2
|
||||||
# of the License, or (at your option) any later version.
|
# of the License, or (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class MailHandlerController < ActionController::Base
|
class MailHandlerController < ActionController::Base
|
||||||
before_filter :check_credential
|
before_filter :check_credential
|
||||||
|
|
||||||
verify :method => :post,
|
verify :method => :post,
|
||||||
:only => :index,
|
:only => :index,
|
||||||
:render => { :nothing => true, :status => 405 }
|
:render => { :nothing => true, :status => 405 }
|
||||||
|
|
||||||
# Submits an incoming email to MailHandler
|
# Submits an incoming email to MailHandler
|
||||||
def index
|
def index
|
||||||
options = params.dup
|
options = params.dup
|
||||||
@ -32,9 +32,9 @@ class MailHandlerController < ActionController::Base
|
|||||||
render :nothing => true, :status => :unprocessable_entity
|
render :nothing => true, :status => :unprocessable_entity
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def check_credential
|
def check_credential
|
||||||
User.current = nil
|
User.current = nil
|
||||||
unless Setting.mail_handler_api_enabled? && params[:key].to_s == Setting.mail_handler_api_key
|
unless Setting.mail_handler_api_enabled? && params[:key].to_s == Setting.mail_handler_api_key
|
||||||
|
Loading…
x
Reference in New Issue
Block a user