diff app/controllers/issues_controller.rb @ 507:0c939c159af4 redmine-1.2

Update to Redmine 1.2.1 on 1.2-stable branch (Redmine SVN rev 6270)
author Chris Cannam
date Thu, 14 Jul 2011 10:32:19 +0100
parents cbce1fd3b1b7
children 851510f1b535 cbb26bc654de
line wrap: on
line diff
--- a/app/controllers/issues_controller.rb	Mon Jun 06 14:24:13 2011 +0100
+++ b/app/controllers/issues_controller.rb	Thu Jul 14 10:32:19 2011 +0100
@@ -27,7 +27,8 @@
   before_filter :find_optional_project, :only => [:index]
   before_filter :check_for_default_issue_status, :only => [:new, :create]
   before_filter :build_new_issue_from_params, :only => [:new, :create]
-  accept_key_auth :index, :show, :create, :update, :destroy
+  accept_rss_auth :index, :show
+  accept_api_auth :index, :show, :create, :update, :destroy
 
   rescue_from Query::StatementInvalid, :with => :query_statement_invalid
 
@@ -301,6 +302,7 @@
     end
 
     @issue.project = @project
+    @issue.author = User.current
     # Tracker must be set before custom field values
     @issue.tracker ||= @project.trackers.find((params[:issue] && params[:issue][:tracker_id]) || params[:tracker_id] || :first)
     if @issue.tracker.nil?
@@ -314,7 +316,6 @@
         @issue.watcher_user_ids = params[:issue]['watcher_user_ids']
       end
     end
-    @issue.author = User.current
     @priorities = IssuePriority.all
     @allowed_statuses = @issue.new_statuses_allowed_to(User.current, true)
   end