Commit 933c5e414600d5e0170213db574ba6431c1444e4
1 parent
e563e948
Exists in
master
and in
4 other branches
update new controllers
Showing
5 changed files
with
5 additions
and
28 deletions
Show diff stats
app/controllers/blame_controller.rb
1 | 1 | # Controller for viewing a file's blame |
2 | -class BlameController < ApplicationController | |
2 | +class BlameController < ProjectController | |
3 | 3 | include ExtractsPath |
4 | 4 | |
5 | - layout "project" | |
6 | - | |
7 | - before_filter :project | |
8 | - | |
9 | 5 | # Authorize |
10 | - before_filter :add_project_abilities | |
11 | 6 | before_filter :authorize_read_project! |
12 | 7 | before_filter :authorize_code_access! |
13 | 8 | before_filter :require_non_empty_project | ... | ... |
app/controllers/blob_controller.rb
1 | 1 | # Controller for viewing a file's blame |
2 | -class BlobController < ApplicationController | |
2 | +class BlobController < ProjectController | |
3 | 3 | include ExtractsPath |
4 | 4 | include Gitlab::Encode |
5 | 5 | |
6 | - layout "project" | |
7 | - | |
8 | - before_filter :project | |
9 | - | |
10 | 6 | # Authorize |
11 | - before_filter :add_project_abilities | |
12 | 7 | before_filter :authorize_read_project! |
13 | 8 | before_filter :authorize_code_access! |
14 | 9 | before_filter :require_non_empty_project | ... | ... |
app/controllers/commit_controller.rb
1 | 1 | # Controller for a specific Commit |
2 | 2 | # |
3 | 3 | # Not to be confused with CommitsController, plural. |
4 | -class CommitController < ApplicationController | |
5 | - before_filter :project | |
6 | - layout "project" | |
7 | - | |
4 | +class CommitController < ProjectController | |
8 | 5 | # Authorize |
9 | - before_filter :add_project_abilities | |
10 | 6 | before_filter :authorize_read_project! |
11 | 7 | before_filter :authorize_code_access! |
12 | 8 | before_filter :require_non_empty_project | ... | ... |
app/controllers/compare_controller.rb
1 | -class CompareController < ApplicationController | |
2 | - before_filter :project | |
3 | - layout "project" | |
4 | - | |
1 | +class CompareController < ProjectController | |
5 | 2 | # Authorize |
6 | - before_filter :add_project_abilities | |
7 | 3 | before_filter :authorize_read_project! |
8 | 4 | before_filter :authorize_code_access! |
9 | 5 | before_filter :require_non_empty_project | ... | ... |
app/controllers/tree_controller.rb
1 | 1 | # Controller for viewing a repository's file structure |
2 | -class TreeController < ApplicationController | |
2 | +class TreeController < ProjectController | |
3 | 3 | include ExtractsPath |
4 | 4 | |
5 | - layout "project" | |
6 | - | |
7 | - before_filter :project | |
8 | - | |
9 | 5 | # Authorize |
10 | - before_filter :add_project_abilities | |
11 | 6 | before_filter :authorize_read_project! |
12 | 7 | before_filter :authorize_code_access! |
13 | 8 | before_filter :require_non_empty_project | ... | ... |