##// END OF EJS Templates
Use :only instead of :except option in IssueRelationsController filters....
Jean-Philippe Lang -
r13324:e111e2bc387e
parent child
Show More
@@ -16,8 +16,8
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 class IssueRelationsController < ApplicationController
18 class IssueRelationsController < ApplicationController
19 before_filter :find_issue, :find_project_from_association, :authorize, :only => [:index, :create]
19 before_filter :find_issue, :authorize, :only => [:index, :create]
20 before_filter :find_relation, :except => [:index, :create]
20 before_filter :find_relation, :only => [:show, :destroy]
21
21
22 accept_api_auth :index, :show, :create, :destroy
22 accept_api_auth :index, :show, :create, :destroy
23
23
@@ -75,9 +75,11 class IssueRelationsController < ApplicationController
75 end
75 end
76 end
76 end
77
77
78 private
78 private
79
79 def find_issue
80 def find_issue
80 @issue = @object = Issue.find(params[:issue_id])
81 @issue = Issue.find(params[:issue_id])
82 @project = @issue.project
81 rescue ActiveRecord::RecordNotFound
83 rescue ActiveRecord::RecordNotFound
82 render_404
84 render_404
83 end
85 end
General Comments 0
You need to be logged in to leave comments. Login now