diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/gon_helper.rb | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab.rb b/lib/gitlab.rb index e073450283b..f42ca5a9cd6 100644 --- a/lib/gitlab.rb +++ b/lib/gitlab.rb @@ -58,6 +58,10 @@ module Gitlab Rails.env.development? || org? || com? end + def self.ee? + Object.const_defined?(:License) + end + def self.process_name return 'sidekiq' if Sidekiq.server? return 'console' if defined?(Rails::Console) diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb index 3235d3ccc4e..e00309e7946 100644 --- a/lib/gitlab/gon_helper.rb +++ b/lib/gitlab/gon_helper.rb @@ -25,6 +25,7 @@ module Gitlab gon.test_env = Rails.env.test? gon.suggested_label_colors = LabelsHelper.suggested_colors gon.first_day_of_week = current_user&.first_day_of_week || Gitlab::CurrentSettings.first_day_of_week + gon.ee = Gitlab.ee? if current_user gon.current_user_id = current_user.id |