diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-06-26 20:41:12 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-06-26 20:41:12 +0000 |
commit | e7c0e16a3ff68681cb475fa382d843c0977a7c09 (patch) | |
tree | 0054114634a6b4e2dd3cc1aaf39a7c8e88a95c50 /app/controllers/activities_controller.rb | |
parent | 339a6212effb4ac1a9e17ff3059c67439a957928 (diff) | |
download | redmine-e7c0e16a3ff68681cb475fa382d843c0977a7c09.tar.gz redmine-e7c0e16a3ff68681cb475fa382d843c0977a7c09.zip |
Use regular #authorize method.
git-svn-id: http://svn.redmine.org/redmine/trunk@16724 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/activities_controller.rb')
-rw-r--r-- | app/controllers/activities_controller.rb | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/app/controllers/activities_controller.rb b/app/controllers/activities_controller.rb index f82f0110a..a9650a6f0 100644 --- a/app/controllers/activities_controller.rb +++ b/app/controllers/activities_controller.rb @@ -17,7 +17,7 @@ class ActivitiesController < ApplicationController menu_item :activity - before_action :find_optional_project + before_action :find_optional_project_by_id, :authorize_global accept_rss_auth :index def index @@ -76,15 +76,4 @@ class ActivitiesController < ApplicationController rescue ActiveRecord::RecordNotFound render_404 end - - private - - # TODO: refactor, duplicated in projects_controller - def find_optional_project - return true unless params[:id] - @project = Project.find(params[:id]) - authorize - rescue ActiveRecord::RecordNotFound - render_404 - end end |