Commit be18397d authored by Cyril's avatar Cyril

rename ProjectController to ProjectResourceController

parent 933c5e41
# 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
......
# 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
......
# 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!
......
require "base64" require "base64"
class CommitsController < ProjectController class CommitsController < ProjectResourceController
include ExtractsPath include ExtractsPath
# Authorize # Authorize
......
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!
......
class DeployKeysController < ProjectController class DeployKeysController < ProjectResourceController
respond_to :html respond_to :html
# Authorize # Authorize
......
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]
......
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
......
class LabelsController < ProjectController class LabelsController < ProjectResourceController
before_filter :module_enabled before_filter :module_enabled
# Allow read any issue # Allow read any issue
......
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]
......
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]
......
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]
......
class ProjectController < ApplicationController class ProjectResourceController < ApplicationController
before_filter :project before_filter :project
# Authorize # Authorize
before_filter :add_project_abilities before_filter :add_project_abilities
......
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
......
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
......
class RefsController < ProjectController class RefsController < ProjectResourceController
include Gitlab::Encode include Gitlab::Encode
# Authorize # Authorize
......
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!
......
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
......
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]
......
# 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
......
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment