Commit 7207dcb1 authored by Dmytro Zaporozhets's avatar Dmytro Zaporozhets

Merge branch 'ag-fix-permissions-bug' into 'master'

Change group policy for Group Activity Analytics

See merge request gitlab-org/gitlab!28646
parents f55a2356 7f7f9c58
......@@ -91,7 +91,7 @@ module EE
rule { has_access & contribution_analytics_available }
.enable :read_group_contribution_analytics
rule { can?(:read_group) & group_activity_analytics_available }
rule { has_access & group_activity_analytics_available }
.enable :read_group_activity_analytics
rule { reporter & cycle_analytics_available }.policy do
......
......@@ -10,6 +10,7 @@ describe 'GroupAnalytics' do
before do
stub_licensed_features(group_activity_analytics: true)
group.add_developer(user)
sign_in(user)
end
......
......@@ -48,7 +48,7 @@ describe API::Analytics::GroupActivityAnalytics do
end
end
context 'when user has no authorization to view a private group' do
context 'when user does not have access to a group' do
let(:current_user) { anonymous_user }
it 'is returns `not_found`' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment