Commit 423c103d authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'fix-auditor-permission-on-productivity-analytics' into 'master'

Allow auditor to view productivity analytics

See merge request gitlab-org/gitlab!83532
parents e7c3c201 58026486
......@@ -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