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
72273f43
Commit
72273f43
authored
Apr 09, 2020
by
Aakriti Gupta
Committed by
Pavel Shutsin
Sep 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove feature flag for Group activity analytics
parent
8c693240
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
32 deletions
+4
-32
ee/app/policies/ee/group_policy.rb
ee/app/policies/ee/group_policy.rb
+1
-1
ee/spec/features/analytics/group_analytics_spec.rb
ee/spec/features/analytics/group_analytics_spec.rb
+3
-17
ee/spec/helpers/ee/groups_helper_spec.rb
ee/spec/helpers/ee/groups_helper_spec.rb
+0
-1
ee/spec/policies/group_policy_spec.rb
ee/spec/policies/group_policy_spec.rb
+0
-2
ee/spec/requests/api/analytics/group_activity_analytics_spec.rb
...c/requests/api/analytics/group_activity_analytics_spec.rb
+0
-11
No files found.
ee/app/policies/ee/group_policy.rb
View file @
72273f43
...
...
@@ -30,7 +30,7 @@ module EE
end
condition
(
:group_activity_analytics_available
)
do
@subject
.
feature_available?
(
:group_activity_analytics
)
&&
::
Feature
.
enabled?
(
:group_activity_analytics
,
@subject
,
type: :licensed
,
default_enabled:
true
)
@subject
.
feature_available?
(
:group_activity_analytics
)
end
condition
(
:can_owners_manage_ldap
,
scope: :global
)
do
...
...
ee/spec/features/analytics/group_analytics_spec.rb
View file @
72273f43
...
...
@@ -14,23 +14,9 @@ RSpec.describe 'GroupAnalytics' do
sign_in
(
user
)
end
context
'when the feature is enabled'
do
it
'renders the container'
do
visit
path
it
'renders the container'
do
visit
path
expect
(
page
).
to
have_css
(
'#js-group-activity'
)
end
end
context
'when the feature is disabled'
do
before
do
stub_feature_flags
(
group_activity_analytics:
false
)
end
it
'does not render the container'
do
visit
path
expect
(
page
).
not_to
have_css
(
'#js-group-activity'
)
end
expect
(
page
).
to
have_css
(
'#js-group-activity'
)
end
end
ee/spec/helpers/ee/groups_helper_spec.rb
View file @
72273f43
...
...
@@ -157,7 +157,6 @@ RSpec.describe GroupsHelper do
describe
'#show_group_activity_analytics?'
do
before
do
stub_feature_flags
(
group_activity_analytics:
feature_available
)
stub_licensed_features
(
group_activity_analytics:
feature_available
)
allow
(
helper
).
to
receive
(
:current_user
)
{
current_user
}
...
...
ee/spec/policies/group_policy_spec.rb
View file @
72273f43
...
...
@@ -176,7 +176,6 @@ RSpec.describe GroupPolicy do
let
(
:current_user
)
{
developer
}
before
do
stub_feature_flags
(
group_activity_analytics:
true
)
stub_licensed_features
(
group_activity_analytics:
true
)
end
...
...
@@ -187,7 +186,6 @@ RSpec.describe GroupPolicy do
let
(
:current_user
)
{
developer
}
before
do
stub_feature_flags
(
group_activity_analytics:
false
)
stub_licensed_features
(
group_activity_analytics:
false
)
end
...
...
ee/spec/requests/api/analytics/group_activity_analytics_spec.rb
View file @
72273f43
...
...
@@ -13,7 +13,6 @@ RSpec.describe API::Analytics::GroupActivityAnalytics do
shared_examples
'GET group_activity'
do
|
activity
,
count
|
let
(
:feature_available
)
{
true
}
let
(
:feature_enabled
)
{
true
}
let
(
:params
)
{
{
group_path:
group
.
full_path
}
}
let
(
:current_user
)
{
reporter
}
let
(
:request
)
do
...
...
@@ -22,7 +21,6 @@ RSpec.describe API::Analytics::GroupActivityAnalytics do
before
do
stub_licensed_features
(
group_activity_analytics:
feature_available
)
stub_feature_flags
(
group_activity_analytics:
feature_enabled
)
request
end
...
...
@@ -39,15 +37,6 @@ RSpec.describe API::Analytics::GroupActivityAnalytics do
context
'when feature is not available in plan'
do
let
(
:feature_available
)
{
false
}
let
(
:feature_enabled
)
{
false
}
it
'is returns `forbidden`'
do
expect
(
response
).
to
have_gitlab_http_status
(
:forbidden
)
end
end
context
'when feature is disabled globally'
do
let
(
:feature_enabled
)
{
false
}
it
'is returns `forbidden`'
do
expect
(
response
).
to
have_gitlab_http_status
(
:forbidden
)
...
...
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