From 6f34d40436531029228e78d7a55a0e3982dbf89e Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Wed, 5 Nov 2014 11:04:08 +0200 Subject: remove auth duplication --- app/controllers/projects/base_tree_controller.rb | 1 - app/controllers/projects/blame_controller.rb | 1 - app/controllers/projects/blob_controller.rb | 1 - app/controllers/projects/branches_controller.rb | 1 - app/controllers/projects/commit_controller.rb | 1 - app/controllers/projects/commits_controller.rb | 1 - app/controllers/projects/compare_controller.rb | 1 - app/controllers/projects/graphs_controller.rb | 1 - app/controllers/projects/network_controller.rb | 1 - app/controllers/projects/raw_controller.rb | 1 - app/controllers/projects/refs_controller.rb | 1 - app/controllers/projects/repositories_controller.rb | 1 - app/controllers/projects/tags_controller.rb | 2 -- app/controllers/projects_controller.rb | 1 - 14 files changed, 15 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/projects/base_tree_controller.rb b/app/controllers/projects/base_tree_controller.rb index 56c306063c8..a7b1b7b40e8 100644 --- a/app/controllers/projects/base_tree_controller.rb +++ b/app/controllers/projects/base_tree_controller.rb @@ -1,7 +1,6 @@ class Projects::BaseTreeController < Projects::ApplicationController include ExtractsPath - before_filter :authorize_read_project! before_filter :authorize_download_code! before_filter :require_non_empty_project end diff --git a/app/controllers/projects/blame_controller.rb b/app/controllers/projects/blame_controller.rb index bad06e7aa2d..367d1295f34 100644 --- a/app/controllers/projects/blame_controller.rb +++ b/app/controllers/projects/blame_controller.rb @@ -3,7 +3,6 @@ class Projects::BlameController < Projects::ApplicationController include ExtractsPath # Authorize - before_filter :authorize_read_project! before_filter :authorize_download_code! before_filter :require_non_empty_project diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 04aa044001e..2412800c493 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -3,7 +3,6 @@ class Projects::BlobController < Projects::ApplicationController include ExtractsPath # Authorize - before_filter :authorize_read_project! before_filter :authorize_download_code! before_filter :require_non_empty_project before_filter :authorize_push_code!, only: [:destroy] diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb index 9f50660a5ad..9ebd498e7fa 100644 --- a/app/controllers/projects/branches_controller.rb +++ b/app/controllers/projects/branches_controller.rb @@ -1,6 +1,5 @@ class Projects::BranchesController < Projects::ApplicationController # Authorize - before_filter :authorize_read_project! before_filter :require_non_empty_project before_filter :authorize_download_code! diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index cf05e6ea220..dac858d8e16 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -3,7 +3,6 @@ # Not to be confused with CommitsController, plural. class Projects::CommitController < Projects::ApplicationController # Authorize - before_filter :authorize_read_project! before_filter :authorize_download_code! before_filter :require_non_empty_project before_filter :commit diff --git a/app/controllers/projects/commits_controller.rb b/app/controllers/projects/commits_controller.rb index 53a0d063d8e..9476b6c0284 100644 --- a/app/controllers/projects/commits_controller.rb +++ b/app/controllers/projects/commits_controller.rb @@ -4,7 +4,6 @@ class Projects::CommitsController < Projects::ApplicationController include ExtractsPath # Authorize - before_filter :authorize_read_project! before_filter :authorize_download_code! before_filter :require_non_empty_project diff --git a/app/controllers/projects/compare_controller.rb b/app/controllers/projects/compare_controller.rb index 6d944025598..ffb8c2e4af1 100644 --- a/app/controllers/projects/compare_controller.rb +++ b/app/controllers/projects/compare_controller.rb @@ -1,6 +1,5 @@ class Projects::CompareController < Projects::ApplicationController # Authorize - before_filter :authorize_read_project! before_filter :authorize_download_code! before_filter :require_non_empty_project diff --git a/app/controllers/projects/graphs_controller.rb b/app/controllers/projects/graphs_controller.rb index 21d3970d65a..4a318cb7d56 100644 --- a/app/controllers/projects/graphs_controller.rb +++ b/app/controllers/projects/graphs_controller.rb @@ -1,6 +1,5 @@ class Projects::GraphsController < Projects::ApplicationController # Authorize - before_filter :authorize_read_project! before_filter :authorize_download_code! before_filter :require_non_empty_project diff --git a/app/controllers/projects/network_controller.rb b/app/controllers/projects/network_controller.rb index 009089ee639..ada1aed0df7 100644 --- a/app/controllers/projects/network_controller.rb +++ b/app/controllers/projects/network_controller.rb @@ -3,7 +3,6 @@ class Projects::NetworkController < Projects::ApplicationController include ApplicationHelper # Authorize - before_filter :authorize_read_project! before_filter :authorize_download_code! before_filter :require_non_empty_project diff --git a/app/controllers/projects/raw_controller.rb b/app/controllers/projects/raw_controller.rb index f4fdd616c50..fdbc4c5a098 100644 --- a/app/controllers/projects/raw_controller.rb +++ b/app/controllers/projects/raw_controller.rb @@ -3,7 +3,6 @@ class Projects::RawController < Projects::ApplicationController include ExtractsPath # Authorize - before_filter :authorize_read_project! before_filter :authorize_download_code! before_filter :require_non_empty_project diff --git a/app/controllers/projects/refs_controller.rb b/app/controllers/projects/refs_controller.rb index 9ac189a78b3..5d9336bdc49 100644 --- a/app/controllers/projects/refs_controller.rb +++ b/app/controllers/projects/refs_controller.rb @@ -2,7 +2,6 @@ class Projects::RefsController < Projects::ApplicationController include ExtractsPath # Authorize - before_filter :authorize_read_project! before_filter :authorize_download_code! before_filter :require_non_empty_project diff --git a/app/controllers/projects/repositories_controller.rb b/app/controllers/projects/repositories_controller.rb index 6d8ef0f1ac8..bcd14a1c847 100644 --- a/app/controllers/projects/repositories_controller.rb +++ b/app/controllers/projects/repositories_controller.rb @@ -1,6 +1,5 @@ class Projects::RepositoriesController < Projects::ApplicationController # Authorize - before_filter :authorize_read_project! before_filter :authorize_download_code! before_filter :require_non_empty_project diff --git a/app/controllers/projects/tags_controller.rb b/app/controllers/projects/tags_controller.rb index 94794fb5dd0..162ddef0fec 100644 --- a/app/controllers/projects/tags_controller.rb +++ b/app/controllers/projects/tags_controller.rb @@ -1,8 +1,6 @@ class Projects::TagsController < Projects::ApplicationController # Authorize - before_filter :authorize_read_project! before_filter :require_non_empty_project - before_filter :authorize_download_code! before_filter :authorize_push_code!, only: [:create] before_filter :authorize_admin_project!, only: [:destroy] diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index f81fc29677b..5a80a2ca465 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -4,7 +4,6 @@ class ProjectsController < ApplicationController before_filter :repository, except: [:new, :create] # Authorize - before_filter :authorize_read_project!, except: [:index, :new, :create] before_filter :authorize_admin_project!, only: [:edit, :update, :destroy, :transfer, :archive, :unarchive, :retry_import] layout 'navless', only: [:new, :create, :fork] -- cgit v1.2.1