diff options
author | Cyril <jv.cyril@gmail.com> | 2012-09-27 13:44:53 +0200 |
---|---|---|
committer | Cyril <jv.cyril@gmail.com> | 2012-09-27 13:44:53 +0200 |
commit | 933c5e414600d5e0170213db574ba6431c1444e4 (patch) | |
tree | 1dbb5540b1cc8e004c0866b1ebff17711c7f5f28 | |
parent | e563e948bb907a26c4a170eaec0f3976fdf11d74 (diff) | |
download | gitlab-ce-933c5e414600d5e0170213db574ba6431c1444e4.tar.gz |
update new controllers
-rw-r--r-- | app/controllers/blame_controller.rb | 7 | ||||
-rw-r--r-- | app/controllers/blob_controller.rb | 7 | ||||
-rw-r--r-- | app/controllers/commit_controller.rb | 6 | ||||
-rw-r--r-- | app/controllers/compare_controller.rb | 6 | ||||
-rw-r--r-- | app/controllers/tree_controller.rb | 7 |
5 files changed, 5 insertions, 28 deletions
diff --git a/app/controllers/blame_controller.rb b/app/controllers/blame_controller.rb index dd0837ea9ab..e3fb69b5f6b 100644 --- a/app/controllers/blame_controller.rb +++ b/app/controllers/blame_controller.rb @@ -1,13 +1,8 @@ # Controller for viewing a file's blame -class BlameController < ApplicationController +class BlameController < ProjectController include ExtractsPath - layout "project" - - before_filter :project - # Authorize - before_filter :add_project_abilities before_filter :authorize_read_project! before_filter :authorize_code_access! before_filter :require_non_empty_project diff --git a/app/controllers/blob_controller.rb b/app/controllers/blob_controller.rb index 33387842ec2..30c704f22ae 100644 --- a/app/controllers/blob_controller.rb +++ b/app/controllers/blob_controller.rb @@ -1,14 +1,9 @@ # Controller for viewing a file's blame -class BlobController < ApplicationController +class BlobController < ProjectController include ExtractsPath include Gitlab::Encode - layout "project" - - before_filter :project - # Authorize - before_filter :add_project_abilities before_filter :authorize_read_project! before_filter :authorize_code_access! before_filter :require_non_empty_project diff --git a/app/controllers/commit_controller.rb b/app/controllers/commit_controller.rb index de0d5b2ee7d..3e1595f169f 100644 --- a/app/controllers/commit_controller.rb +++ b/app/controllers/commit_controller.rb @@ -1,12 +1,8 @@ # Controller for a specific Commit # # Not to be confused with CommitsController, plural. -class CommitController < ApplicationController - before_filter :project - layout "project" - +class CommitController < ProjectController # Authorize - before_filter :add_project_abilities before_filter :authorize_read_project! before_filter :authorize_code_access! before_filter :require_non_empty_project diff --git a/app/controllers/compare_controller.rb b/app/controllers/compare_controller.rb index 62f968fd1ed..96c5c7e1b01 100644 --- a/app/controllers/compare_controller.rb +++ b/app/controllers/compare_controller.rb @@ -1,9 +1,5 @@ -class CompareController < ApplicationController - before_filter :project - layout "project" - +class CompareController < ProjectController # Authorize - before_filter :add_project_abilities before_filter :authorize_read_project! before_filter :authorize_code_access! before_filter :require_non_empty_project diff --git a/app/controllers/tree_controller.rb b/app/controllers/tree_controller.rb index e6313783d6e..4d5c409d42c 100644 --- a/app/controllers/tree_controller.rb +++ b/app/controllers/tree_controller.rb @@ -1,13 +1,8 @@ # Controller for viewing a repository's file structure -class TreeController < ApplicationController +class TreeController < ProjectController include ExtractsPath - layout "project" - - before_filter :project - # Authorize - before_filter :add_project_abilities before_filter :authorize_read_project! before_filter :authorize_code_access! before_filter :require_non_empty_project |