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