Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2018-06-26 12:36:16 +0300
committerJose <jvargas@gitlab.com>2018-06-27 07:06:25 +0300
commit91463e52467d4b93d95693ac4eba1d5630ecdc98 (patch)
treedabe37b1c6a169d59e1611d17e0157cf0516e33b /app/controllers
parentc4df74d1e1ba53996c0d64a8f8ef91712bbecf75 (diff)
Specify environment actions to distinguish between metrics and every other environment related actions
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/environments_controller.rb8
-rw-r--r--app/controllers/projects/git_http_client_controller.rb1
-rw-r--r--app/controllers/projects/uploads_controller.rb2
3 files changed, 6 insertions, 5 deletions
diff --git a/app/controllers/projects/environments_controller.rb b/app/controllers/projects/environments_controller.rb
index 47b2028860d..decef19a0a2 100644
--- a/app/controllers/projects/environments_controller.rb
+++ b/app/controllers/projects/environments_controller.rb
@@ -31,10 +31,6 @@ class Projects::EnvironmentsController < Projects::ApplicationController
end
end
- def empty
- render :empty
- end
-
def folder
folder_environments = project.environments.where(environment_type: params[:id])
@environments = folder_environments.with_state(params[:scope] || :available)
@@ -124,6 +120,10 @@ class Projects::EnvironmentsController < Projects::ApplicationController
end
end
+ def empty
+ render :empty
+ end
+
def metrics
# Currently, this acts as a hint to load the metrics details into the cache
# if they aren't there already
diff --git a/app/controllers/projects/git_http_client_controller.rb b/app/controllers/projects/git_http_client_controller.rb
index 07249fe3182..199a8a4c4c5 100644
--- a/app/controllers/projects/git_http_client_controller.rb
+++ b/app/controllers/projects/git_http_client_controller.rb
@@ -15,6 +15,7 @@ class Projects::GitHttpClientController < Projects::ApplicationController
# Git clients will not know what authenticity token to send along
skip_before_action :verify_authenticity_token
skip_before_action :repository
+ skip_before_action :available_environment
before_action :authenticate_user
private
diff --git a/app/controllers/projects/uploads_controller.rb b/app/controllers/projects/uploads_controller.rb
index f5cf089ad98..14e84f6a65f 100644
--- a/app/controllers/projects/uploads_controller.rb
+++ b/app/controllers/projects/uploads_controller.rb
@@ -2,7 +2,7 @@ class Projects::UploadsController < Projects::ApplicationController
include UploadsActions
# These will kick you out if you don't have access.
- skip_before_action :project, :repository,
+ skip_before_action :project, :repository, :available_environment,
if: -> { action_name == 'show' && image_or_video? }
before_action :authorize_upload_file!, only: [:create]