Commit 85d78b5d authored by charlie ablett's avatar charlie ablett

Merge branch 'rename_epic_board_list' into 'master'

Rename *_epic_list permissions

See merge request gitlab-org/gitlab!53698
parents 54dd0ddb fe04a5c0
......@@ -15,7 +15,7 @@ module Mutations
null: true,
description: 'Epic list in the epic board.'
authorize :admin_epic_list
authorize :admin_epic_board_list
private
......
......@@ -30,7 +30,7 @@ module Resolvers
private
def authorize!
Ability.allowed?(context[:current_user], :read_epic_list, epic_board.group) || raise_resource_not_available_error!
Ability.allowed?(context[:current_user], :read_epic_board_list, epic_board.group) || raise_resource_not_available_error!
end
def preloads
......
......@@ -181,7 +181,7 @@ module EE
rule { can?(:read_group) & epics_available }.policy do
enable :read_epic
enable :read_epic_board
enable :read_epic_list
enable :read_epic_board_list
end
rule { can?(:read_group) & iterations_available }.enable :read_iteration
......@@ -198,7 +198,7 @@ module EE
enable :read_confidential_epic
enable :destroy_epic_link
enable :admin_epic_board
enable :admin_epic_list
enable :admin_epic_board_list
end
rule { reporter & subepics_available }.policy do
......@@ -215,7 +215,7 @@ module EE
prevent :admin_epic
prevent :update_epic
prevent :destroy_epic
prevent :admin_epic_list
prevent :admin_epic_board_list
end
rule { auditor }.policy do
......
......@@ -7,8 +7,8 @@ RSpec.describe GroupPolicy do
let(:epic_rules) do
%i(read_epic create_epic admin_epic destroy_epic read_confidential_epic
destroy_epic_link read_epic_board read_epic_list admin_epic_board
admin_epic_list)
destroy_epic_link read_epic_board read_epic_board_list admin_epic_board
admin_epic_board_list)
end
context 'when epics feature is disabled' do
......@@ -59,7 +59,7 @@ RSpec.describe GroupPolicy do
let(:current_user) { guest }
it { is_expected.to be_allowed(:read_epic, :read_epic_board) }
it { is_expected.to be_disallowed(*(epic_rules - [:read_epic, :read_epic_board, :read_epic_list])) }
it { is_expected.to be_disallowed(*(epic_rules - [:read_epic, :read_epic_board, :read_epic_board_list])) }
end
context 'when user is not member' do
......
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