From 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 19 May 2021 15:44:42 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-12-stable-ee --- app/graphql/mutations/boards/lists/update.rb | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'app/graphql/mutations/boards/lists/update.rb') diff --git a/app/graphql/mutations/boards/lists/update.rb b/app/graphql/mutations/boards/lists/update.rb index 504082ec22c..d17dd5162a0 100644 --- a/app/graphql/mutations/boards/lists/update.rb +++ b/app/graphql/mutations/boards/lists/update.rb @@ -3,7 +3,7 @@ module Mutations module Boards module Lists - class Update < BaseMutation + class Update < BaseUpdate graphql_name 'UpdateBoardList' argument :list_id, Types::GlobalIDType[List], @@ -11,29 +11,11 @@ module Mutations loads: Types::BoardListType, description: 'Global ID of the list.' - argument :position, GraphQL::INT_TYPE, - required: false, - description: 'Position of list within the board.' - - argument :collapsed, GraphQL::BOOLEAN_TYPE, - required: false, - description: 'Indicates if the list is collapsed for this user.' - field :list, Types::BoardListType, null: true, description: 'Mutated list.' - def resolve(list: nil, **args) - raise_resource_not_available_error! unless can_read_list?(list) - update_result = update_list(list, args) - - { - list: update_result[:list], - errors: list.errors.full_messages - } - end - private def update_list(list, args) @@ -42,8 +24,6 @@ module Mutations end def can_read_list?(list) - return false unless list.present? - Ability.allowed?(current_user, :read_issue_board_list, list.board) end end -- cgit v1.2.3