diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-02-20 16:30:15 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-02-20 17:20:03 +0100 |
commit | 00408f37e34f37f1299df6957f62bfa7ff341749 (patch) | |
tree | 30551090734befffad07d9a877eb15766b09d5d9 /app | |
parent | 6b0199ffc1c8e6a79b68a510052a1d1713afc29d (diff) | |
download | gitlab-ce-00408f37e34f37f1299df6957f62bfa7ff341749.tar.gz |
Move 'require_non_empty_project' filter to front so 'assign_ref_vars' doesn't 404.
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/blame_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/blob_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/branches_controller.rb | 1 | ||||
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/commits_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/compare_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/forks_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/graphs_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/network_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/raw_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/refs_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/repositories_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/tree_controller.rb | 2 |
13 files changed, 12 insertions, 13 deletions
diff --git a/app/controllers/projects/blame_controller.rb b/app/controllers/projects/blame_controller.rb index 106f21b83e6..489a6ae5666 100644 --- a/app/controllers/projects/blame_controller.rb +++ b/app/controllers/projects/blame_controller.rb @@ -2,9 +2,9 @@ class Projects::BlameController < Projects::ApplicationController include ExtractsPath + before_filter :require_non_empty_project before_filter :assign_ref_vars before_filter :authorize_download_code! - before_filter :require_non_empty_project def show @blob = @repository.blob_at(@commit.id, @path) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index dccb96ba1d1..8071f13173d 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -5,8 +5,8 @@ class Projects::BlobController < Projects::ApplicationController # Raised when given an invalid file path class InvalidPathError < StandardError; end - before_filter :authorize_download_code! before_filter :require_non_empty_project, except: [:new, :create] + before_filter :authorize_download_code! before_filter :authorize_push_code!, only: [:destroy] before_filter :assign_blob_vars before_filter :commit, except: [:new, :create] diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb index cff1a907dc2..f7bb36c40bb 100644 --- a/app/controllers/projects/branches_controller.rb +++ b/app/controllers/projects/branches_controller.rb @@ -2,7 +2,6 @@ class Projects::BranchesController < Projects::ApplicationController include ActionView::Helpers::SanitizeHelper # Authorize before_filter :require_non_empty_project - before_filter :authorize_download_code! before_filter :authorize_push_code!, only: [:create, :destroy] diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 96a782bdf7a..87e39f1363a 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -3,8 +3,8 @@ # Not to be confused with CommitsController, plural. class Projects::CommitController < Projects::ApplicationController # Authorize - before_filter :authorize_download_code! before_filter :require_non_empty_project + before_filter :authorize_download_code! before_filter :commit def show diff --git a/app/controllers/projects/commits_controller.rb b/app/controllers/projects/commits_controller.rb index b133afe44b5..4b6ab437476 100644 --- a/app/controllers/projects/commits_controller.rb +++ b/app/controllers/projects/commits_controller.rb @@ -3,9 +3,9 @@ require "base64" class Projects::CommitsController < Projects::ApplicationController include ExtractsPath + before_filter :require_non_empty_project before_filter :assign_ref_vars before_filter :authorize_download_code! - before_filter :require_non_empty_project def show @repo = @project.repository diff --git a/app/controllers/projects/compare_controller.rb b/app/controllers/projects/compare_controller.rb index ffb8c2e4af1..8a359042d7b 100644 --- a/app/controllers/projects/compare_controller.rb +++ b/app/controllers/projects/compare_controller.rb @@ -1,7 +1,7 @@ class Projects::CompareController < Projects::ApplicationController # Authorize - before_filter :authorize_download_code! before_filter :require_non_empty_project + before_filter :authorize_download_code! def index end diff --git a/app/controllers/projects/forks_controller.rb b/app/controllers/projects/forks_controller.rb index a0481d11582..414da0bbdc9 100644 --- a/app/controllers/projects/forks_controller.rb +++ b/app/controllers/projects/forks_controller.rb @@ -1,7 +1,7 @@ class Projects::ForksController < Projects::ApplicationController # Authorize - before_filter :authorize_download_code! before_filter :require_non_empty_project + before_filter :authorize_download_code! def new @namespaces = current_user.manageable_namespaces diff --git a/app/controllers/projects/graphs_controller.rb b/app/controllers/projects/graphs_controller.rb index 4a318cb7d56..752474b4a4c 100644 --- a/app/controllers/projects/graphs_controller.rb +++ b/app/controllers/projects/graphs_controller.rb @@ -1,7 +1,7 @@ class Projects::GraphsController < Projects::ApplicationController # Authorize - before_filter :authorize_download_code! before_filter :require_non_empty_project + before_filter :authorize_download_code! def show respond_to do |format| diff --git a/app/controllers/projects/network_controller.rb b/app/controllers/projects/network_controller.rb index 59f2a745367..83d1c1dacae 100644 --- a/app/controllers/projects/network_controller.rb +++ b/app/controllers/projects/network_controller.rb @@ -2,9 +2,9 @@ class Projects::NetworkController < Projects::ApplicationController include ExtractsPath include ApplicationHelper + before_filter :require_non_empty_project before_filter :assign_ref_vars before_filter :authorize_download_code! - before_filter :require_non_empty_project def show respond_to do |format| diff --git a/app/controllers/projects/raw_controller.rb b/app/controllers/projects/raw_controller.rb index c4ddc32e8c3..b1a029ce696 100644 --- a/app/controllers/projects/raw_controller.rb +++ b/app/controllers/projects/raw_controller.rb @@ -2,9 +2,9 @@ class Projects::RawController < Projects::ApplicationController include ExtractsPath + before_filter :require_non_empty_project before_filter :assign_ref_vars before_filter :authorize_download_code! - before_filter :require_non_empty_project def show @blob = @repository.blob_at(@commit.id, @path) diff --git a/app/controllers/projects/refs_controller.rb b/app/controllers/projects/refs_controller.rb index b80472f8eb4..0adecded17e 100644 --- a/app/controllers/projects/refs_controller.rb +++ b/app/controllers/projects/refs_controller.rb @@ -1,9 +1,9 @@ class Projects::RefsController < Projects::ApplicationController include ExtractsPath + before_filter :require_non_empty_project before_filter :assign_ref_vars before_filter :authorize_download_code! - before_filter :require_non_empty_project def switch respond_to do |format| diff --git a/app/controllers/projects/repositories_controller.rb b/app/controllers/projects/repositories_controller.rb index 3a90c1c806d..320c3965265 100644 --- a/app/controllers/projects/repositories_controller.rb +++ b/app/controllers/projects/repositories_controller.rb @@ -1,7 +1,7 @@ class Projects::RepositoriesController < Projects::ApplicationController # Authorize - before_filter :authorize_download_code! before_filter :require_non_empty_project, except: :create + before_filter :authorize_download_code! before_filter :authorize_admin_project!, only: :create def create diff --git a/app/controllers/projects/tree_controller.rb b/app/controllers/projects/tree_controller.rb index 5b52640a4e1..70cd5a62ff5 100644 --- a/app/controllers/projects/tree_controller.rb +++ b/app/controllers/projects/tree_controller.rb @@ -2,9 +2,9 @@ class Projects::TreeController < Projects::ApplicationController include ExtractsPath + before_filter :require_non_empty_project, except: [:new, :create] 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? |