From a24eabb1782785ad0bcf2460c3fff67106598b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C5=82gorzata=20Ksionek?= Date: Tue, 5 Mar 2019 10:38:09 +0100 Subject: [PATCH] Resolve conflicts in group policy --- app/policies/group_policy.rb | 1 - 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