OSDN Git Service

update new controllers
authorCyril <jv.cyril@gmail.com>
Thu, 27 Sep 2012 11:44:53 +0000 (13:44 +0200)
committerCyril <jv.cyril@gmail.com>
Thu, 27 Sep 2012 11:44:53 +0000 (13:44 +0200)
app/controllers/blame_controller.rb
app/controllers/blob_controller.rb
app/controllers/commit_controller.rb
app/controllers/compare_controller.rb
app/controllers/tree_controller.rb

index dd0837e..e3fb69b 100644 (file)
@@ -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
index 3338784..30c704f 100644 (file)
@@ -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
index de0d5b2..3e1595f 100644 (file)
@@ -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
index 62f968f..96c5c7e 100644 (file)
@@ -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
index e631378..4d5c409 100644 (file)
@@ -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