summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyril <jv.cyril@gmail.com>2012-09-27 20:59:42 +0200
committerCyril <jv.cyril@gmail.com>2012-09-27 20:59:42 +0200
commitbe18397d82ca16fefed7287c8078a9b41bf37c95 (patch)
tree1f821afcb942bdda9da1aaa6abc571d90cafe884
parent933c5e414600d5e0170213db574ba6431c1444e4 (diff)
downloadgitlab-ce-be18397d82ca16fefed7287c8078a9b41bf37c95.tar.gz
rename ProjectController to ProjectResourceController
-rw-r--r--app/controllers/blame_controller.rb2
-rw-r--r--app/controllers/blob_controller.rb2
-rw-r--r--app/controllers/commit_controller.rb2
-rw-r--r--app/controllers/commits_controller.rb2
-rw-r--r--app/controllers/compare_controller.rb2
-rw-r--r--app/controllers/deploy_keys_controller.rb2
-rw-r--r--app/controllers/hooks_controller.rb2
-rw-r--r--app/controllers/issues_controller.rb2
-rw-r--r--app/controllers/labels_controller.rb2
-rw-r--r--app/controllers/merge_requests_controller.rb2
-rw-r--r--app/controllers/milestones_controller.rb2
-rw-r--r--app/controllers/notes_controller.rb2
-rw-r--r--app/controllers/project_resource_controller.rb (renamed from app/controllers/project_controller.rb)2
-rw-r--r--app/controllers/projects_controller.rb2
-rw-r--r--app/controllers/protected_branches_controller.rb2
-rw-r--r--app/controllers/refs_controller.rb2
-rw-r--r--app/controllers/repositories_controller.rb2
-rw-r--r--app/controllers/snippets_controller.rb2
-rw-r--r--app/controllers/team_members_controller.rb2
-rw-r--r--app/controllers/tree_controller.rb2
-rw-r--r--app/controllers/wikis_controller.rb2
-rw-r--r--app/views/layouts/project_resource.html.haml (renamed from app/views/layouts/project.html.haml)0
22 files changed, 21 insertions, 21 deletions
diff --git a/app/controllers/blame_controller.rb b/app/controllers/blame_controller.rb
index e3fb69b5f6b..37d7245ccb4 100644
--- a/app/controllers/blame_controller.rb
+++ b/app/controllers/blame_controller.rb
@@ -1,5 +1,5 @@
# Controller for viewing a file's blame
-class BlameController < ProjectController
+class BlameController < ProjectResourceController
include ExtractsPath
# Authorize
diff --git a/app/controllers/blob_controller.rb b/app/controllers/blob_controller.rb
index 30c704f22ae..30069d19965 100644
--- a/app/controllers/blob_controller.rb
+++ b/app/controllers/blob_controller.rb
@@ -1,5 +1,5 @@
# Controller for viewing a file's blame
-class BlobController < ProjectController
+class BlobController < ProjectResourceController
include ExtractsPath
include Gitlab::Encode
diff --git a/app/controllers/commit_controller.rb b/app/controllers/commit_controller.rb
index 3e1595f169f..25a1f0fe708 100644
--- a/app/controllers/commit_controller.rb
+++ b/app/controllers/commit_controller.rb
@@ -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!
diff --git a/app/controllers/commits_controller.rb b/app/controllers/commits_controller.rb
index 81a9e90d062..3b8ebdb5ddc 100644
--- a/app/controllers/commits_controller.rb
+++ b/app/controllers/commits_controller.rb
@@ -1,6 +1,6 @@
require "base64"
-class CommitsController < ProjectController
+class CommitsController < ProjectResourceController
include ExtractsPath
# Authorize
diff --git a/app/controllers/compare_controller.rb b/app/controllers/compare_controller.rb
index 96c5c7e1b01..ae20f9c0ba6 100644
--- a/app/controllers/compare_controller.rb
+++ b/app/controllers/compare_controller.rb
@@ -1,4 +1,4 @@
-class CompareController < ProjectController
+class CompareController < ProjectResourceController
# Authorize
before_filter :authorize_read_project!
before_filter :authorize_code_access!
diff --git a/app/controllers/deploy_keys_controller.rb b/app/controllers/deploy_keys_controller.rb
index 29f924e80d1..a89ebbcb8d5 100644
--- a/app/controllers/deploy_keys_controller.rb
+++ b/app/controllers/deploy_keys_controller.rb
@@ -1,4 +1,4 @@
-class DeployKeysController < ProjectController
+class DeployKeysController < ProjectResourceController
respond_to :html
# Authorize
diff --git a/app/controllers/hooks_controller.rb b/app/controllers/hooks_controller.rb
index 23b81194eb9..b7d25e36252 100644
--- a/app/controllers/hooks_controller.rb
+++ b/app/controllers/hooks_controller.rb
@@ -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]
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 114a6a19828..82ae5b37deb 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -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
diff --git a/app/controllers/labels_controller.rb b/app/controllers/labels_controller.rb
index 203bff56a71..3cbbb8692e0 100644
--- a/app/controllers/labels_controller.rb
+++ b/app/controllers/labels_controller.rb
@@ -1,4 +1,4 @@
-class LabelsController < ProjectController
+class LabelsController < ProjectResourceController
before_filter :module_enabled
# Allow read any issue
diff --git a/app/controllers/merge_requests_controller.rb b/app/controllers/merge_requests_controller.rb
index db6e48d5e09..f8d84263688 100644
--- a/app/controllers/merge_requests_controller.rb
+++ b/app/controllers/merge_requests_controller.rb
@@ -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]
diff --git a/app/controllers/milestones_controller.rb b/app/controllers/milestones_controller.rb
index 19baf531eb9..68479a26923 100644
--- a/app/controllers/milestones_controller.rb
+++ b/app/controllers/milestones_controller.rb
@@ -1,4 +1,4 @@
-class MilestonesController < ProjectController
+class MilestonesController < ProjectResourceController
before_filter :module_enabled
before_filter :milestone, only: [:edit, :update, :destroy, :show]
diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb
index 138d5170bf6..7f5f5cd2869 100644
--- a/app/controllers/notes_controller.rb
+++ b/app/controllers/notes_controller.rb
@@ -1,4 +1,4 @@
-class NotesController < ProjectController
+class NotesController < ProjectResourceController
# Authorize
before_filter :authorize_read_note!
before_filter :authorize_write_note!, only: [:create]
diff --git a/app/controllers/project_controller.rb b/app/controllers/project_resource_controller.rb
index de4f317a7bd..d297bba635f 100644
--- a/app/controllers/project_controller.rb
+++ b/app/controllers/project_resource_controller.rb
@@ -1,4 +1,4 @@
-class ProjectController < ApplicationController
+class ProjectResourceController < ApplicationController
before_filter :project
# Authorize
before_filter :add_project_abilities
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 81c267a8ede..13b264a4059 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -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
diff --git a/app/controllers/protected_branches_controller.rb b/app/controllers/protected_branches_controller.rb
index e91c78bdd35..fd2734eff84 100644
--- a/app/controllers/protected_branches_controller.rb
+++ b/app/controllers/protected_branches_controller.rb
@@ -1,4 +1,4 @@
-class ProtectedBranchesController < ProjectController
+class ProtectedBranchesController < ProjectResourceController
# Authorize
before_filter :authorize_read_project!
before_filter :require_non_empty_project
diff --git a/app/controllers/refs_controller.rb b/app/controllers/refs_controller.rb
index 9c585c9373b..d3fc816bfd9 100644
--- a/app/controllers/refs_controller.rb
+++ b/app/controllers/refs_controller.rb
@@ -1,4 +1,4 @@
-class RefsController < ProjectController
+class RefsController < ProjectResourceController
include Gitlab::Encode
# Authorize
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb
index ef72e2e9f02..18b240e4550 100644
--- a/app/controllers/repositories_controller.rb
+++ b/app/controllers/repositories_controller.rb
@@ -1,4 +1,4 @@
-class RepositoriesController < ProjectController
+class RepositoriesController < ProjectResourceController
# Authorize
before_filter :authorize_read_project!
before_filter :authorize_code_access!
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb
index 03e5cc73ce3..7324a4594eb 100644
--- a/app/controllers/snippets_controller.rb
+++ b/app/controllers/snippets_controller.rb
@@ -1,4 +1,4 @@
-class SnippetsController < ProjectController
+class SnippetsController < ProjectResourceController
before_filter :snippet, only: [:show, :edit, :destroy, :update, :raw]
# Allow read any snippet
diff --git a/app/controllers/team_members_controller.rb b/app/controllers/team_members_controller.rb
index 8261acfec52..d0b699f61d5 100644
--- a/app/controllers/team_members_controller.rb
+++ b/app/controllers/team_members_controller.rb
@@ -1,4 +1,4 @@
-class TeamMembersController < ProjectController
+class TeamMembersController < ProjectResourceController
# Authorize
before_filter :authorize_read_project!
before_filter :authorize_admin_project!, except: [:index, :show]
diff --git a/app/controllers/tree_controller.rb b/app/controllers/tree_controller.rb
index 4d5c409d42c..2e4ff7d315b 100644
--- a/app/controllers/tree_controller.rb
+++ b/app/controllers/tree_controller.rb
@@ -1,5 +1,5 @@
# Controller for viewing a repository's file structure
-class TreeController < ProjectController
+class TreeController < ProjectResourceController
include ExtractsPath
# Authorize
diff --git a/app/controllers/wikis_controller.rb b/app/controllers/wikis_controller.rb
index f13d072439f..a93afe114df 100644
--- a/app/controllers/wikis_controller.rb
+++ b/app/controllers/wikis_controller.rb
@@ -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
diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project_resource.html.haml
index b1dbe41ce65..b1dbe41ce65 100644
--- a/app/views/layouts/project.html.haml
+++ b/app/views/layouts/project_resource.html.haml