summaryrefslogtreecommitdiff
path: root/lib/gitlab.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab.rb')
-rw-r--r--lib/gitlab.rb15
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?