Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f7391e51
Commit
f7391e51
authored
Jul 20, 2021
by
Rajendra Kadam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prepend EE to CE
parent
a3246c17
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
22 deletions
+17
-22
app/services/service_ping/service_ping_settings.rb
app/services/service_ping/service_ping_settings.rb
+10
-8
ee/app/services/ee/service_ping/permit_data_categories_service.rb
...ervices/ee/service_ping/permit_data_categories_service.rb
+1
-1
ee/app/services/ee/service_ping/service_ping_settings.rb
ee/app/services/ee/service_ping/service_ping_settings.rb
+5
-8
ee/spec/services/ee/service_ping/permit_data_categories_service_spec.rb
...es/ee/service_ping/permit_data_categories_service_spec.rb
+0
-2
ee/spec/services/ee/service_ping/service_ping_settings_spec.rb
...ec/services/ee/service_ping/service_ping_settings_spec.rb
+1
-1
spec/services/service_ping/permit_data_categories_service_spec.rb
...vices/service_ping/permit_data_categories_service_spec.rb
+0
-2
No files found.
app/services/service_ping/service_ping_settings.rb
View file @
f7391e51
...
...
@@ -2,16 +2,18 @@
module
ServicePing
module
ServicePingSettings
class
<<
self
def
product_intelligence_enabled?
pings_enabled?
&&
!
User
.
single_user
&
.
requires_usage_stats_consent?
end
extend
self
private
def
product_intelligence_enabled?
pings_enabled?
&&
!
User
.
single_user
&
.
requires_usage_stats_consent?
end
private
def
pings_enabled?
::
Gitlab
::
CurrentSettings
.
usage_ping_enabled?
end
def
pings_enabled?
::
Gitlab
::
CurrentSettings
.
usage_ping_enabled?
end
end
end
ServicePing
::
ServicePingSettings
.
extend_mod_with
(
'ServicePing::ServicePingSettings'
)
ee/app/services/ee/service_ping/permit_data_categories_service.rb
View file @
f7391e51
...
...
@@ -13,7 +13,7 @@ module EE
override
:execute
def
execute
return
super
unless
::
License
.
current
.
present?
return
[]
unless
ServicePing
::
ServicePing
Settings
.
product_intelligence_enabled?
return
[]
unless
ServicePingSettings
.
product_intelligence_enabled?
optional_enabled
=
::
Gitlab
::
CurrentSettings
.
usage_ping_enabled?
customer_service_enabled
=
::
License
.
current
.
customer_service_enabled?
...
...
ee/app/services/ee/service_ping/service_ping_settings.rb
View file @
f7391e51
...
...
@@ -3,16 +3,13 @@
module
EE
module
ServicePing
module
ServicePingSettings
class
<<
self
def
product_intelligence_enabled?
pings_enabled?
&&
!::
User
.
single_user
&
.
requires_usage_stats_consent?
end
extend
::
Gitlab
::
Utils
::
Override
private
private
def
pings_enabled?
::
License
.
current
&
.
customer_service_enabled?
||
::
Gitlab
::
CurrentSettings
.
usage_ping
_enabled?
end
override
:
pings_enabled?
def
pings
_enabled?
::
License
.
current
&
.
customer_service_enabled?
||
super
end
end
end
...
...
ee/spec/services/ee/service_ping/permit_data_categories_service_spec.rb
View file @
f7391e51
...
...
@@ -3,8 +3,6 @@
require
'spec_helper'
RSpec
.
describe
ServicePing
::
PermitDataCategoriesService
do
using
RSpec
::
Parameterized
::
TableSyntax
describe
'#execute'
do
subject
(
:permitted_categories
)
{
described_class
.
new
.
execute
}
...
...
ee/spec/services/ee/service_ping/service_ping_settings_spec.rb
View file @
f7391e51
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
EE
::
ServicePing
::
ServicePingSettings
do
RSpec
.
describe
ServicePing
::
ServicePingSettings
do
using
RSpec
::
Parameterized
::
TableSyntax
describe
'#product_intelligence_enabled?'
do
...
...
spec/services/service_ping/permit_data_categories_service_spec.rb
View file @
f7391e51
...
...
@@ -3,8 +3,6 @@
require
'spec_helper'
RSpec
.
describe
ServicePing
::
PermitDataCategoriesService
do
using
RSpec
::
Parameterized
::
TableSyntax
describe
'#execute'
,
:without_license
do
subject
(
:permitted_categories
)
{
described_class
.
new
.
execute
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment