Commit a24eabb1 authored by Małgorzata Ksionek's avatar Małgorzata Ksionek

Resolve conflicts in group policy

parent ad2f711a
...@@ -53,7 +53,6 @@ class GroupPolicy < BasePolicy ...@@ -53,7 +53,6 @@ class GroupPolicy < BasePolicy
rule { admin }.enable :read_group rule { admin }.enable :read_group
rule { has_projects }.policy do rule { has_projects }.policy do
enable :read_group
enable :read_list enable :read_list
enable :read_label enable :read_label
end end
......
...@@ -114,13 +114,13 @@ describe GroupPolicy do ...@@ -114,13 +114,13 @@ describe GroupPolicy do
project.add_developer(current_user) project.add_developer(current_user)
end end
it { expect_allowed(:read_label) } it { expect_allowed(:read_label, :read_list) }
context 'in subgroups', :nested_groups do context 'in subgroups', :nested_groups do
let(:subgroup) { create(:group, :private, parent: group) } let(:subgroup) { create(:group, :private, parent: group) }
let(:project) { create(:project, namespace: subgroup) } let(:project) { create(:project, namespace: subgroup) }
it { expect_allowed(:read_label) } it { expect_allowed(:read_label, :read_list) }
end end
end 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