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
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-26 12:10:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-26 12:10:42 +0300
commitdb950c5706cdf47f7ccc2e02a4ffd691432ac5dc (patch)
treefdceeac88d490aae384eecc636964d7f03be9c24 /app
parent7cd527ffd9cfef1c872faa5377eaccc3df6ef067 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/helpers/tooling/visual_review_helper.rb4
-rw-r--r--app/models/concerns/sha_attribute.rb4
-rw-r--r--app/models/concerns/x509_serial_number_attribute.rb2
-rw-r--r--app/views/layouts/application.html.haml2
4 files changed, 8 insertions, 4 deletions
diff --git a/app/helpers/tooling/visual_review_helper.rb b/app/helpers/tooling/visual_review_helper.rb
index cd3b8be5aac..47afae49759 100644
--- a/app/helpers/tooling/visual_review_helper.rb
+++ b/app/helpers/tooling/visual_review_helper.rb
@@ -22,5 +22,9 @@ module Tooling
'id': 'review-app-toolbar-script',
'src': 'https://gitlab.com/assets/webpack/visual_review_toolbar.js' }
end
+
+ def review_apps_enabled?
+ Gitlab::Utils.to_boolean(ENV['REVIEW_APPS_ENABLED'], default: false)
+ end
end
end
diff --git a/app/models/concerns/sha_attribute.rb b/app/models/concerns/sha_attribute.rb
index 701d2fda5c5..35c48c15fb2 100644
--- a/app/models/concerns/sha_attribute.rb
+++ b/app/models/concerns/sha_attribute.rb
@@ -22,7 +22,7 @@ module ShaAttribute
class_methods do
def sha_attribute(name)
- return if ENV['STATIC_VERIFICATION']
+ return if Gitlab::Environment.static_verification?
sha_attribute_fields << name
@@ -34,7 +34,7 @@ module ShaAttribute
end
def sha256_attribute(name)
- return if ENV['STATIC_VERIFICATION']
+ return if Gitlab::Environment.static_verification?
sha256_attribute_fields << name
diff --git a/app/models/concerns/x509_serial_number_attribute.rb b/app/models/concerns/x509_serial_number_attribute.rb
index 9dc53859ac0..b65736b7924 100644
--- a/app/models/concerns/x509_serial_number_attribute.rb
+++ b/app/models/concerns/x509_serial_number_attribute.rb
@@ -5,7 +5,7 @@ module X509SerialNumberAttribute
class_methods do
def x509_serial_number_attribute(name)
- return if ENV['STATIC_VERIFICATION']
+ return if Gitlab::Environment.static_verification?
validate_binary_column_exists!(name) unless Rails.env.production?
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index fa79219df4a..53e88d95893 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -8,7 +8,7 @@
%body{ class: body_classes, data: body_data }
= render "layouts/init_auto_complete" if @gfm_form
= render "layouts/init_client_detection_flags"
- = render "layouts/visual_review" if ENV['REVIEW_APPS_ENABLED']
+ = render "layouts/visual_review" if review_apps_enabled?
= render 'peek/bar'
= header_message