Commit 509ff29b authored by Tetiana Chupryna's avatar Tetiana Chupryna

Tune security findings policy

Don't allow guests of private projects see findings
since they don't have an access to the repo
parent af69fb12
......@@ -157,7 +157,7 @@ module EE
rule { can?(:public_access) }.enable :read_package
rule { can?(:read_project) & can?(:read_build) }.enable :read_security_findings
rule { can?(:read_build) & can?(:download_code) }.enable :read_security_findings
rule { can?(:developer_access) }.policy do
enable :read_project_security_dashboard
......
......@@ -418,8 +418,8 @@ describe ProjectPolicy do
context 'with private project' do
let(:project) { create(:project, :private, namespace: owner.namespace) }
context 'with guest or above' do
let(:current_user) { guest }
context 'with reporter or above' do
let(:current_user) { reporter }
it { is_expected.to be_allowed(:read_security_findings) }
end
......
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