diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-26 15:09:04 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-26 15:09:04 +0000 |
commit | ee24c7d68f57a67754a5d1e2ea99f688029d14bd (patch) | |
tree | 8391744a26dd3f77c4bb1bbb55672ba0e066d969 /lib/gitlab.rb | |
parent | a1c0b634f78f51389fd3ec390a1803afa3de49a2 (diff) | |
download | gitlab-ce-ee24c7d68f57a67754a5d1e2ea99f688029d14bd.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab.rb')
-rw-r--r-- | lib/gitlab.rb | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/gitlab.rb b/lib/gitlab.rb index 2eff78efbec..1190c92ce17 100644 --- a/lib/gitlab.rb +++ b/lib/gitlab.rb @@ -4,11 +4,8 @@ require 'pathname' require 'forwardable' require_relative 'gitlab_edition' -require_relative 'gitlab/utils' module Gitlab - GITLAB_SIMULATE_SAAS = Gitlab::Utils.to_boolean(ENV['GITLAB_SIMULATE_SAAS'], default: false) - class << self extend Forwardable @@ -52,18 +49,10 @@ module Gitlab INSTALLATION_TYPE = File.read(root.join("INSTALLATION_TYPE")).strip.freeze HTTP_PROXY_ENV_VARS = %w(http_proxy https_proxy HTTP_PROXY HTTPS_PROXY).freeze - # We allow GitLab instances to "pretend" they are SaaS to test SaaS-specific code - # paths, but only when in development mode or when running on production instances - # with a license issued to a GitLab team member. def self.simulate_com? - return false unless GITLAB_SIMULATE_SAAS - return false if Rails.env.test? - - Rails.env.development? || licensed_to_gitlab_team_member? - end + return false unless Rails.env.development? - def self.licensed_to_gitlab_team_member? - ee? && ::License.current&.issued_to_gitlab_team_member? + Gitlab::Utils.to_boolean(ENV['GITLAB_SIMULATE_SAAS']) end def self.com? |