remove auth duplication
This commit is contained in:
parent
652f4c8090
commit
6f34d40436
14 changed files with 0 additions and 15 deletions
|
@ -1,7 +1,6 @@
|
||||||
class Projects::BaseTreeController < Projects::ApplicationController
|
class Projects::BaseTreeController < Projects::ApplicationController
|
||||||
include ExtractsPath
|
include ExtractsPath
|
||||||
|
|
||||||
before_filter :authorize_read_project!
|
|
||||||
before_filter :authorize_download_code!
|
before_filter :authorize_download_code!
|
||||||
before_filter :require_non_empty_project
|
before_filter :require_non_empty_project
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,6 @@ class Projects::BlameController < Projects::ApplicationController
|
||||||
include ExtractsPath
|
include ExtractsPath
|
||||||
|
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
|
||||||
before_filter :authorize_download_code!
|
before_filter :authorize_download_code!
|
||||||
before_filter :require_non_empty_project
|
before_filter :require_non_empty_project
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ class Projects::BlobController < Projects::ApplicationController
|
||||||
include ExtractsPath
|
include ExtractsPath
|
||||||
|
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
|
||||||
before_filter :authorize_download_code!
|
before_filter :authorize_download_code!
|
||||||
before_filter :require_non_empty_project
|
before_filter :require_non_empty_project
|
||||||
before_filter :authorize_push_code!, only: [:destroy]
|
before_filter :authorize_push_code!, only: [:destroy]
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
class Projects::BranchesController < Projects::ApplicationController
|
class Projects::BranchesController < Projects::ApplicationController
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
|
||||||
before_filter :require_non_empty_project
|
before_filter :require_non_empty_project
|
||||||
|
|
||||||
before_filter :authorize_download_code!
|
before_filter :authorize_download_code!
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
# Not to be confused with CommitsController, plural.
|
# Not to be confused with CommitsController, plural.
|
||||||
class Projects::CommitController < Projects::ApplicationController
|
class Projects::CommitController < Projects::ApplicationController
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
|
||||||
before_filter :authorize_download_code!
|
before_filter :authorize_download_code!
|
||||||
before_filter :require_non_empty_project
|
before_filter :require_non_empty_project
|
||||||
before_filter :commit
|
before_filter :commit
|
||||||
|
|
|
@ -4,7 +4,6 @@ class Projects::CommitsController < Projects::ApplicationController
|
||||||
include ExtractsPath
|
include ExtractsPath
|
||||||
|
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
|
||||||
before_filter :authorize_download_code!
|
before_filter :authorize_download_code!
|
||||||
before_filter :require_non_empty_project
|
before_filter :require_non_empty_project
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
class Projects::CompareController < Projects::ApplicationController
|
class Projects::CompareController < Projects::ApplicationController
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
|
||||||
before_filter :authorize_download_code!
|
before_filter :authorize_download_code!
|
||||||
before_filter :require_non_empty_project
|
before_filter :require_non_empty_project
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
class Projects::GraphsController < Projects::ApplicationController
|
class Projects::GraphsController < Projects::ApplicationController
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
|
||||||
before_filter :authorize_download_code!
|
before_filter :authorize_download_code!
|
||||||
before_filter :require_non_empty_project
|
before_filter :require_non_empty_project
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ class Projects::NetworkController < Projects::ApplicationController
|
||||||
include ApplicationHelper
|
include ApplicationHelper
|
||||||
|
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
|
||||||
before_filter :authorize_download_code!
|
before_filter :authorize_download_code!
|
||||||
before_filter :require_non_empty_project
|
before_filter :require_non_empty_project
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ class Projects::RawController < Projects::ApplicationController
|
||||||
include ExtractsPath
|
include ExtractsPath
|
||||||
|
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
|
||||||
before_filter :authorize_download_code!
|
before_filter :authorize_download_code!
|
||||||
before_filter :require_non_empty_project
|
before_filter :require_non_empty_project
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ class Projects::RefsController < Projects::ApplicationController
|
||||||
include ExtractsPath
|
include ExtractsPath
|
||||||
|
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
|
||||||
before_filter :authorize_download_code!
|
before_filter :authorize_download_code!
|
||||||
before_filter :require_non_empty_project
|
before_filter :require_non_empty_project
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
class Projects::RepositoriesController < Projects::ApplicationController
|
class Projects::RepositoriesController < Projects::ApplicationController
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
|
||||||
before_filter :authorize_download_code!
|
before_filter :authorize_download_code!
|
||||||
before_filter :require_non_empty_project
|
before_filter :require_non_empty_project
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
class Projects::TagsController < Projects::ApplicationController
|
class Projects::TagsController < Projects::ApplicationController
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
|
||||||
before_filter :require_non_empty_project
|
before_filter :require_non_empty_project
|
||||||
|
|
||||||
before_filter :authorize_download_code!
|
before_filter :authorize_download_code!
|
||||||
before_filter :authorize_push_code!, only: [:create]
|
before_filter :authorize_push_code!, only: [:create]
|
||||||
before_filter :authorize_admin_project!, only: [:destroy]
|
before_filter :authorize_admin_project!, only: [:destroy]
|
||||||
|
|
|
@ -4,7 +4,6 @@ class ProjectsController < ApplicationController
|
||||||
before_filter :repository, except: [:new, :create]
|
before_filter :repository, except: [:new, :create]
|
||||||
|
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!, except: [:index, :new, :create]
|
|
||||||
before_filter :authorize_admin_project!, only: [:edit, :update, :destroy, :transfer, :archive, :unarchive, :retry_import]
|
before_filter :authorize_admin_project!, only: [:edit, :update, :destroy, :transfer, :archive, :unarchive, :retry_import]
|
||||||
|
|
||||||
layout 'navless', only: [:new, :create, :fork]
|
layout 'navless', only: [:new, :create, :fork]
|
||||||
|
|
Loading…
Reference in a new issue