diff options
-rw-r--r-- | app/policies/group_policy.rb | 1 | ||||
-rw-r--r-- | changelogs/unreleased/58149-fix-read-list-board-policy.yml | 6 | ||||
-rw-r--r-- | spec/policies/group_policy_spec.rb | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb index c25766a5af8..298769c0eb8 100644 --- a/app/policies/group_policy.rb +++ b/app/policies/group_policy.rb @@ -54,6 +54,7 @@ class GroupPolicy < BasePolicy rule { has_projects }.policy do enable :read_group + enable :read_list enable :read_label end diff --git a/changelogs/unreleased/58149-fix-read-list-board-policy.yml b/changelogs/unreleased/58149-fix-read-list-board-policy.yml new file mode 100644 index 00000000000..964813f4c9a --- /dev/null +++ b/changelogs/unreleased/58149-fix-read-list-board-policy.yml @@ -0,0 +1,6 @@ +--- +title: Fix error when viewing group issue boards when user doesn't have explicit group + permissions +merge_request: 25524 +author: +type: fixed diff --git a/spec/policies/group_policy_spec.rb b/spec/policies/group_policy_spec.rb index be1804c5ce0..af6d6f084a9 100644 --- a/spec/policies/group_policy_spec.rb +++ b/spec/policies/group_policy_spec.rb @@ -83,7 +83,7 @@ describe GroupPolicy do end it do - expect_allowed(:read_group, :read_label) + expect_allowed(:read_group, :read_list, :read_label) end context 'in subgroups', :nested_groups do @@ -91,7 +91,7 @@ describe GroupPolicy do let(:project) { create(:project, namespace: subgroup) } it do - expect_allowed(:read_group, :read_label) + expect_allowed(:read_group, :read_list, :read_label) end end end |