Commit fe04a5c0 authored by Jan Provaznik's avatar Jan Provaznik

Rename epic_list permissions

It was pointed out that these names might be confusing, new names
should make it clearer that these permissions are related to epic
boards.
parent 98db8e81
......@@ -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