mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-20 15:31:12 +00:00
Use :only instead of :except option in IssueRelationsController filters.
git-svn-id: http://svn.redmine.org/redmine/trunk@13706 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
50b12518a1
commit
e111e2bc38
@ -16,8 +16,8 @@
|
|||||||
# 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 IssueRelationsController < ApplicationController
|
class IssueRelationsController < ApplicationController
|
||||||
before_filter :find_issue, :find_project_from_association, :authorize, :only => [:index, :create]
|
before_filter :find_issue, :authorize, :only => [:index, :create]
|
||||||
before_filter :find_relation, :except => [:index, :create]
|
before_filter :find_relation, :only => [:show, :destroy]
|
||||||
|
|
||||||
accept_api_auth :index, :show, :create, :destroy
|
accept_api_auth :index, :show, :create, :destroy
|
||||||
|
|
||||||
@ -75,9 +75,11 @@ class IssueRelationsController < ApplicationController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def find_issue
|
def find_issue
|
||||||
@issue = @object = Issue.find(params[:issue_id])
|
@issue = Issue.find(params[:issue_id])
|
||||||
|
@project = @issue.project
|
||||||
rescue ActiveRecord::RecordNotFound
|
rescue ActiveRecord::RecordNotFound
|
||||||
render_404
|
render_404
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user