Commit 58026486 authored by Magdalena Frankiewicz's avatar Magdalena Frankiewicz

Allow auditor to view grop productivity analytics

The auditor role should be able to view productivity analytics
of a group they are not a member of, as per our docs.

Changelog: fixed
EE: true
parent e6a0f5b9
......@@ -171,6 +171,10 @@ module EE
enable :admin_protected_environment
end
rule { auditor }.policy do
enable :view_productivity_analytics
end
rule { owner | admin }.policy do
enable :owner_access
end
......
......@@ -74,6 +74,16 @@ RSpec.describe Groups::Analytics::ProductivityAnalyticsController do
let(:target_id) { 'g_analytics_productivity' }
end
end
context 'when user is an auditor' do
let(:current_user) { create(:user, :auditor) }
it 'allows access' do
subject
expect(response).to have_gitlab_http_status(:success)
end
end
end
describe 'GET show.json' 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