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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /app/graphql/mutations/boards/lists/update.rb
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'app/graphql/mutations/boards/lists/update.rb')
-rw-r--r--app/graphql/mutations/boards/lists/update.rb22
1 files changed, 1 insertions, 21 deletions
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