rename ProjectController to ProjectResourceController
This commit is contained in:
parent
933c5e4146
commit
be18397d82
22 changed files with 21 additions and 21 deletions
|
@ -1,5 +1,5 @@
|
||||||
# Controller for viewing a file's blame
|
# Controller for viewing a file's blame
|
||||||
class BlameController < ProjectController
|
class BlameController < ProjectResourceController
|
||||||
include ExtractsPath
|
include ExtractsPath
|
||||||
|
|
||||||
# Authorize
|
# Authorize
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Controller for viewing a file's blame
|
# Controller for viewing a file's blame
|
||||||
class BlobController < ProjectController
|
class BlobController < ProjectResourceController
|
||||||
include ExtractsPath
|
include ExtractsPath
|
||||||
include Gitlab::Encode
|
include Gitlab::Encode
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Controller for a specific Commit
|
# Controller for a specific Commit
|
||||||
#
|
#
|
||||||
# Not to be confused with CommitsController, plural.
|
# Not to be confused with CommitsController, plural.
|
||||||
class CommitController < ProjectController
|
class CommitController < ProjectResourceController
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
before_filter :authorize_read_project!
|
||||||
before_filter :authorize_code_access!
|
before_filter :authorize_code_access!
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
require "base64"
|
require "base64"
|
||||||
|
|
||||||
class CommitsController < ProjectController
|
class CommitsController < ProjectResourceController
|
||||||
include ExtractsPath
|
include ExtractsPath
|
||||||
|
|
||||||
# Authorize
|
# Authorize
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CompareController < ProjectController
|
class CompareController < ProjectResourceController
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
before_filter :authorize_read_project!
|
||||||
before_filter :authorize_code_access!
|
before_filter :authorize_code_access!
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class DeployKeysController < ProjectController
|
class DeployKeysController < ProjectResourceController
|
||||||
respond_to :html
|
respond_to :html
|
||||||
|
|
||||||
# Authorize
|
# Authorize
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class HooksController < ProjectController
|
class HooksController < ProjectResourceController
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
before_filter :authorize_read_project!
|
||||||
before_filter :authorize_admin_project!, only: [:new, :create, :destroy]
|
before_filter :authorize_admin_project!, only: [:new, :create, :destroy]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class IssuesController < ProjectController
|
class IssuesController < ProjectResourceController
|
||||||
before_filter :module_enabled
|
before_filter :module_enabled
|
||||||
before_filter :issue, only: [:edit, :update, :destroy, :show]
|
before_filter :issue, only: [:edit, :update, :destroy, :show]
|
||||||
helper_method :issues_filter
|
helper_method :issues_filter
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class LabelsController < ProjectController
|
class LabelsController < ProjectResourceController
|
||||||
before_filter :module_enabled
|
before_filter :module_enabled
|
||||||
|
|
||||||
# Allow read any issue
|
# Allow read any issue
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class MergeRequestsController < ProjectController
|
class MergeRequestsController < ProjectResourceController
|
||||||
before_filter :module_enabled
|
before_filter :module_enabled
|
||||||
before_filter :merge_request, only: [:edit, :update, :destroy, :show, :commits, :diffs, :automerge, :automerge_check, :raw]
|
before_filter :merge_request, only: [:edit, :update, :destroy, :show, :commits, :diffs, :automerge, :automerge_check, :raw]
|
||||||
before_filter :validates_merge_request, only: [:show, :diffs, :raw]
|
before_filter :validates_merge_request, only: [:show, :diffs, :raw]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class MilestonesController < ProjectController
|
class MilestonesController < ProjectResourceController
|
||||||
before_filter :module_enabled
|
before_filter :module_enabled
|
||||||
before_filter :milestone, only: [:edit, :update, :destroy, :show]
|
before_filter :milestone, only: [:edit, :update, :destroy, :show]
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class NotesController < ProjectController
|
class NotesController < ProjectResourceController
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_note!
|
before_filter :authorize_read_note!
|
||||||
before_filter :authorize_write_note!, only: [:create]
|
before_filter :authorize_write_note!, only: [:create]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class ProjectController < ApplicationController
|
class ProjectResourceController < ApplicationController
|
||||||
before_filter :project
|
before_filter :project
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :add_project_abilities
|
before_filter :add_project_abilities
|
|
@ -1,6 +1,6 @@
|
||||||
require Rails.root.join('lib', 'gitlab', 'graph_commit')
|
require Rails.root.join('lib', 'gitlab', 'graph_commit')
|
||||||
|
|
||||||
class ProjectsController < ProjectController
|
class ProjectsController < ProjectResourceController
|
||||||
skip_before_filter :project, only: [:new, :create]
|
skip_before_filter :project, only: [:new, :create]
|
||||||
|
|
||||||
# Authorize
|
# Authorize
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class ProtectedBranchesController < ProjectController
|
class ProtectedBranchesController < ProjectResourceController
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
before_filter :authorize_read_project!
|
||||||
before_filter :require_non_empty_project
|
before_filter :require_non_empty_project
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class RefsController < ProjectController
|
class RefsController < ProjectResourceController
|
||||||
include Gitlab::Encode
|
include Gitlab::Encode
|
||||||
|
|
||||||
# Authorize
|
# Authorize
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class RepositoriesController < ProjectController
|
class RepositoriesController < ProjectResourceController
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
before_filter :authorize_read_project!
|
||||||
before_filter :authorize_code_access!
|
before_filter :authorize_code_access!
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class SnippetsController < ProjectController
|
class SnippetsController < ProjectResourceController
|
||||||
before_filter :snippet, only: [:show, :edit, :destroy, :update, :raw]
|
before_filter :snippet, only: [:show, :edit, :destroy, :update, :raw]
|
||||||
|
|
||||||
# Allow read any snippet
|
# Allow read any snippet
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class TeamMembersController < ProjectController
|
class TeamMembersController < ProjectResourceController
|
||||||
# Authorize
|
# Authorize
|
||||||
before_filter :authorize_read_project!
|
before_filter :authorize_read_project!
|
||||||
before_filter :authorize_admin_project!, except: [:index, :show]
|
before_filter :authorize_admin_project!, except: [:index, :show]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Controller for viewing a repository's file structure
|
# Controller for viewing a repository's file structure
|
||||||
class TreeController < ProjectController
|
class TreeController < ProjectResourceController
|
||||||
include ExtractsPath
|
include ExtractsPath
|
||||||
|
|
||||||
# Authorize
|
# Authorize
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class WikisController < ProjectController
|
class WikisController < ProjectResourceController
|
||||||
before_filter :authorize_read_wiki!
|
before_filter :authorize_read_wiki!
|
||||||
before_filter :authorize_write_wiki!, only: [:edit, :create, :history]
|
before_filter :authorize_write_wiki!, only: [:edit, :create, :history]
|
||||||
before_filter :authorize_admin_wiki!, only: :destroy
|
before_filter :authorize_admin_wiki!, only: :destroy
|
||||||
|
|
Loading…
Reference in a new issue