@@ -16,8 +16,8 | |||
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class IssueRelationsController < ApplicationController |
|
19 |
before_filter :find_issue |
|
|
20 |
before_filter :find_relation, : |
|
|
19 | before_filter :find_issue, :authorize, :only => [:index, :create] | |
|
20 | before_filter :find_relation, :only => [:show, :destroy] | |
|
21 | 21 | |
|
22 | 22 | accept_api_auth :index, :show, :create, :destroy |
|
23 | 23 | |
@@ -75,9 +75,11 class IssueRelationsController < ApplicationController | |||
|
75 | 75 | end |
|
76 | 76 | end |
|
77 | 77 | |
|
78 | private | |
|
78 | private | |
|
79 | ||
|
79 | 80 | def find_issue |
|
80 |
@issue |
|
|
81 | @issue = Issue.find(params[:issue_id]) | |
|
82 | @project = @issue.project | |
|
81 | 83 | rescue ActiveRecord::RecordNotFound |
|
82 | 84 | render_404 |
|
83 | 85 | end |
General Comments 0
You need to be logged in to leave comments.
Login now