diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-27 02:01:51 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-27 02:01:51 +0300 |
commit | c916124178645412a554a6b8b39c05bbd42269c8 (patch) | |
tree | d42a3ea6b1b0a9048c609be57a24b2711d9072e3 /app/controllers/projects/tree_controller.rb | |
parent | 6a2384e0bc7d0b703c8f6af144c85af47eae6630 (diff) |
Explicitly set before_filter for ref-related controllers
Diffstat (limited to 'app/controllers/projects/tree_controller.rb')
-rw-r--r-- | app/controllers/projects/tree_controller.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/projects/tree_controller.rb b/app/controllers/projects/tree_controller.rb index 4d033b36848..5b52640a4e1 100644 --- a/app/controllers/projects/tree_controller.rb +++ b/app/controllers/projects/tree_controller.rb @@ -1,7 +1,12 @@ # Controller for viewing a repository's file structure -class Projects::TreeController < Projects::BaseTreeController - def show +class Projects::TreeController < Projects::ApplicationController + include ExtractsPath + + before_filter :assign_ref_vars + before_filter :authorize_download_code! + before_filter :require_non_empty_project, except: [:new, :create] + def show if tree.entries.empty? if @repository.blob_at(@commit.id, @path) redirect_to project_blob_path(@project, File.join(@ref, @path)) and return |