Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/mutations/boards/issues/issue_move_list.rb')
-rw-r--r--app/graphql/mutations/boards/issues/issue_move_list.rb45
1 files changed, 24 insertions, 21 deletions
diff --git a/app/graphql/mutations/boards/issues/issue_move_list.rb b/app/graphql/mutations/boards/issues/issue_move_list.rb
index 91dfd9fc3e9..096ac89db1c 100644
--- a/app/graphql/mutations/boards/issues/issue_move_list.rb
+++ b/app/graphql/mutations/boards/issues/issue_move_list.rb
@@ -5,35 +5,38 @@ module Mutations
module Issues
class IssueMoveList < Mutations::Issues::Base
graphql_name 'IssueMoveList'
+ BoardGID = ::Types::GlobalIDType[::Board]
+ ListID = ::GraphQL::ID_TYPE
+ IssueID = ::GraphQL::ID_TYPE
- argument :board_id, GraphQL::ID_TYPE,
- required: true,
- loads: Types::BoardType,
- description: 'Global ID of the board that the issue is in.'
+ argument :board_id, BoardGID,
+ required: true,
+ loads: Types::BoardType,
+ description: 'Global ID of the board that the issue is in.'
argument :project_path, GraphQL::ID_TYPE,
- required: true,
- description: 'Project the issue to mutate is in.'
+ required: true,
+ description: 'Project the issue to mutate is in.'
argument :iid, GraphQL::STRING_TYPE,
- required: true,
- description: 'IID of the issue to mutate.'
+ required: true,
+ description: 'IID of the issue to mutate.'
- argument :from_list_id, GraphQL::ID_TYPE,
- required: false,
- description: 'ID of the board list that the issue will be moved from.'
+ argument :from_list_id, ListID,
+ required: false,
+ description: 'ID of the board list that the issue will be moved from.'
- argument :to_list_id, GraphQL::ID_TYPE,
- required: false,
- description: 'ID of the board list that the issue will be moved to.'
+ argument :to_list_id, ListID,
+ required: false,
+ description: 'ID of the board list that the issue will be moved to.'
- argument :move_before_id, GraphQL::ID_TYPE,
- required: false,
- description: 'ID of issue that should be placed before the current issue.'
+ argument :move_before_id, IssueID,
+ required: false,
+ description: 'ID of issue that should be placed before the current issue.'
- argument :move_after_id, GraphQL::ID_TYPE,
- required: false,
- description: 'ID of issue that should be placed after the current issue.'
+ argument :move_after_id, IssueID,
+ required: false,
+ description: 'ID of issue that should be placed after the current issue.'
def ready?(**args)
if move_arguments(args).blank?
@@ -83,7 +86,7 @@ module Mutations
end
def authorize_board!(board)
- return if Ability.allowed?(current_user, :read_board, board.resource_parent)
+ return if Ability.allowed?(current_user, :read_issue_board, board.resource_parent)
raise_resource_not_available_error!
end