diff options
author | Małgorzata Ksionek <meksionek@gmail.com> | 2019-03-05 10:38:09 +0100 |
---|---|---|
committer | Małgorzata Ksionek <meksionek@gmail.com> | 2019-03-05 10:38:09 +0100 |
commit | a24eabb1782785ad0bcf2460c3fff67106598b83 (patch) | |
tree | 077b22e9726e7015bf5df98c68a007f3146a253c | |
parent | ad2f711adfe151f15f19559884cd84a8dd26e93e (diff) | |
download | gitlab-ce-a24eabb1782785ad0bcf2460c3fff67106598b83.tar.gz |
Resolve conflicts in group policy
-rw-r--r-- | app/policies/group_policy.rb | 1 | ||||
-rw-r--r-- | spec/policies/group_policy_spec.rb | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb index 298769c0eb8..e74e5f008d7 100644 --- a/app/policies/group_policy.rb +++ b/app/policies/group_policy.rb @@ -53,7 +53,6 @@ class GroupPolicy < BasePolicy rule { admin }.enable :read_group rule { has_projects }.policy do - enable :read_group enable :read_list enable :read_label end diff --git a/spec/policies/group_policy_spec.rb b/spec/policies/group_policy_spec.rb index 4c31ff30fc6..0ad50c6f91f 100644 --- a/spec/policies/group_policy_spec.rb +++ b/spec/policies/group_policy_spec.rb @@ -114,13 +114,13 @@ describe GroupPolicy do project.add_developer(current_user) end - it { expect_allowed(:read_label) } + it { expect_allowed(:read_label, :read_list) } context 'in subgroups', :nested_groups do let(:subgroup) { create(:group, :private, parent: group) } let(:project) { create(:project, namespace: subgroup) } - it { expect_allowed(:read_label) } + it { expect_allowed(:read_label, :read_list) } end end |