summaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /app/controllers/application_controller.rb
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
downloadgitlab-ce-4555e1b21c365ed8303ffb7a3325d773c9b8bf31.tar.gz
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 607f3435394..00b9fb1060d 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -22,6 +22,7 @@ class ApplicationController < ActionController::Base
include Gitlab::Logging::CloudflareHelper
include Gitlab::Utils::StrongMemoize
include ::Gitlab::WithFeatureCategory
+ include FlocOptOut
before_action :authenticate_user!, except: [:route_not_found]
before_action :enforce_terms!, if: :should_enforce_terms?
@@ -105,6 +106,10 @@ class ApplicationController < ActionController::Base
redirect_back(fallback_location: default, **options)
end
+ def check_if_gl_com_or_dev
+ render_404 unless ::Gitlab.dev_env_or_com?
+ end
+
def not_found
render_404
end
@@ -207,13 +212,13 @@ class ApplicationController < ActionController::Base
end
respond_to do |format|
- format.any { head status }
format.html do
render template,
layout: "errors",
status: status,
locals: { message: message }
end
+ format.any { head status }
end
end
@@ -223,8 +228,8 @@ class ApplicationController < ActionController::Base
def render_403
respond_to do |format|
- format.any { head :forbidden }
format.html { render "errors/access_denied", layout: "errors", status: :forbidden }
+ format.any { head :forbidden }
end
end
@@ -555,4 +560,4 @@ class ApplicationController < ActionController::Base
end
end
-ApplicationController.prepend_ee_mod
+ApplicationController.prepend_mod