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
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-11-22 09:10:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-11-22 09:10:40 +0300
commitddf03f07a081390feaa19247db3fdd87f8c32843 (patch)
tree02ac26592717d728ecfa05887cb68c1715fd98ad /app
parent9ff55fb235c23c9260305f5a96e2a1af8fed8f19 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/graphql/mutations/achievements/award.rb4
-rw-r--r--app/graphql/mutations/achievements/create.rb4
-rw-r--r--app/graphql/mutations/achievements/delete.rb4
-rw-r--r--app/graphql/mutations/achievements/delete_user_achievement.rb4
-rw-r--r--app/graphql/mutations/achievements/revoke.rb4
-rw-r--r--app/graphql/mutations/achievements/update.rb4
-rw-r--r--app/graphql/mutations/alert_management/http_integration/http_integration_base.rb4
-rw-r--r--app/graphql/mutations/alert_management/prometheus_integration/prometheus_integration_base.rb4
-rw-r--r--app/graphql/mutations/boards/destroy.rb6
-rw-r--r--app/graphql/mutations/boards/lists/create.rb4
-rw-r--r--app/graphql/mutations/custom_emoji/destroy.rb6
-rw-r--r--app/graphql/mutations/customer_relations/contacts/create.rb4
-rw-r--r--app/graphql/mutations/customer_relations/organizations/create.rb4
-rw-r--r--app/graphql/mutations/saved_replies/base.rb4
-rw-r--r--app/graphql/mutations/saved_replies/destroy.rb2
-rw-r--r--app/graphql/mutations/saved_replies/update.rb2
-rw-r--r--app/graphql/mutations/snippets/base.rb4
-rw-r--r--app/graphql/mutations/work_items/convert.rb4
18 files changed, 2 insertions, 70 deletions
diff --git a/app/graphql/mutations/achievements/award.rb b/app/graphql/mutations/achievements/award.rb
index b486049594d..71a46a04a1c 100644
--- a/app/graphql/mutations/achievements/award.rb
+++ b/app/graphql/mutations/achievements/award.rb
@@ -29,10 +29,6 @@ module Mutations
result = ::Achievements::AwardService.new(current_user, achievement.id, recipient_id).execute
{ user_achievement: result.payload, errors: result.errors }
end
-
- def find_object(id:)
- GitlabSchema.object_from_id(id, expected_type: ::Achievements::Achievement)
- end
end
end
end
diff --git a/app/graphql/mutations/achievements/create.rb b/app/graphql/mutations/achievements/create.rb
index 310a653c705..497eaee9b70 100644
--- a/app/graphql/mutations/achievements/create.rb
+++ b/app/graphql/mutations/achievements/create.rb
@@ -41,10 +41,6 @@ module Mutations
params: args).execute
{ achievement: result.payload, errors: result.errors }
end
-
- def find_object(id:)
- GitlabSchema.object_from_id(id, expected_type: ::Namespace)
- end
end
end
end
diff --git a/app/graphql/mutations/achievements/delete.rb b/app/graphql/mutations/achievements/delete.rb
index 0b510b44b4e..fc00261a176 100644
--- a/app/graphql/mutations/achievements/delete.rb
+++ b/app/graphql/mutations/achievements/delete.rb
@@ -24,10 +24,6 @@ module Mutations
result = ::Achievements::DestroyService.new(current_user, achievement).execute
{ achievement: result.payload, errors: result.errors }
end
-
- def find_object(id:)
- GitlabSchema.object_from_id(id, expected_type: ::Achievements::Achievement)
- end
end
end
end
diff --git a/app/graphql/mutations/achievements/delete_user_achievement.rb b/app/graphql/mutations/achievements/delete_user_achievement.rb
index f1527c2981a..be4c5a1d5e2 100644
--- a/app/graphql/mutations/achievements/delete_user_achievement.rb
+++ b/app/graphql/mutations/achievements/delete_user_achievement.rb
@@ -24,10 +24,6 @@ module Mutations
result = ::Achievements::DestroyUserAchievementService.new(current_user, user_achievement).execute
{ user_achievement: result.payload, errors: result.errors }
end
-
- def find_object(id:)
- GitlabSchema.object_from_id(id, expected_type: ::Achievements::UserAchievement)
- end
end
end
end
diff --git a/app/graphql/mutations/achievements/revoke.rb b/app/graphql/mutations/achievements/revoke.rb
index 9d21b1c3741..ac5b38cefbf 100644
--- a/app/graphql/mutations/achievements/revoke.rb
+++ b/app/graphql/mutations/achievements/revoke.rb
@@ -24,10 +24,6 @@ module Mutations
result = ::Achievements::RevokeService.new(current_user, user_achievement).execute
{ user_achievement: result.payload, errors: result.errors }
end
-
- def find_object(id:)
- GitlabSchema.object_from_id(id, expected_type: ::Achievements::UserAchievement)
- end
end
end
end
diff --git a/app/graphql/mutations/achievements/update.rb b/app/graphql/mutations/achievements/update.rb
index 2a9e6580629..8bb95ac41f3 100644
--- a/app/graphql/mutations/achievements/update.rb
+++ b/app/graphql/mutations/achievements/update.rb
@@ -37,10 +37,6 @@ module Mutations
result = ::Achievements::UpdateService.new(current_user, achievement, args).execute
{ achievement: result.payload, errors: result.errors }
end
-
- def find_object(id:)
- GitlabSchema.object_from_id(id, expected_type: ::Achievements::Achievement)
- end
end
end
end
diff --git a/app/graphql/mutations/alert_management/http_integration/http_integration_base.rb b/app/graphql/mutations/alert_management/http_integration/http_integration_base.rb
index 9434ac1637e..760005ae249 100644
--- a/app/graphql/mutations/alert_management/http_integration/http_integration_base.rb
+++ b/app/graphql/mutations/alert_management/http_integration/http_integration_base.rb
@@ -13,10 +13,6 @@ module Mutations
private
- def find_object(id:)
- GitlabSchema.object_from_id(id, expected_class: ::AlertManagement::HttpIntegration)
- end
-
def response(result)
{
integration: result.payload[:integration],
diff --git a/app/graphql/mutations/alert_management/prometheus_integration/prometheus_integration_base.rb b/app/graphql/mutations/alert_management/prometheus_integration/prometheus_integration_base.rb
index 28729ec70cd..19fb514d3a5 100644
--- a/app/graphql/mutations/alert_management/prometheus_integration/prometheus_integration_base.rb
+++ b/app/graphql/mutations/alert_management/prometheus_integration/prometheus_integration_base.rb
@@ -13,10 +13,6 @@ module Mutations
private
- def find_object(id:)
- GitlabSchema.object_from_id(id, expected_class: ::Integrations::Prometheus)
- end
-
def response(integration, result)
{
integration: integration,
diff --git a/app/graphql/mutations/boards/destroy.rb b/app/graphql/mutations/boards/destroy.rb
index 61e0c95f8d3..abdffaaeb90 100644
--- a/app/graphql/mutations/boards/destroy.rb
+++ b/app/graphql/mutations/boards/destroy.rb
@@ -26,12 +26,6 @@ module Mutations
errors: response.errors
}
end
-
- private
-
- def find_object(id:)
- GitlabSchema.object_from_id(id, expected_type: ::Board)
- end
end
end
end
diff --git a/app/graphql/mutations/boards/lists/create.rb b/app/graphql/mutations/boards/lists/create.rb
index 590a905ab7b..a80a6af9e2f 100644
--- a/app/graphql/mutations/boards/lists/create.rb
+++ b/app/graphql/mutations/boards/lists/create.rb
@@ -19,10 +19,6 @@ module Mutations
private
- def find_object(id:)
- GitlabSchema.object_from_id(id, expected_type: ::Board)
- end
-
def create_list(board, params)
create_list_service =
::Boards::Lists::CreateService.new(board.resource_parent, current_user, params)
diff --git a/app/graphql/mutations/custom_emoji/destroy.rb b/app/graphql/mutations/custom_emoji/destroy.rb
index 64e3f2ed7d3..0dd989ad841 100644
--- a/app/graphql/mutations/custom_emoji/destroy.rb
+++ b/app/graphql/mutations/custom_emoji/destroy.rb
@@ -29,12 +29,6 @@ module Mutations
custom_emoji: custom_emoji
}
end
-
- private
-
- def find_object(id:)
- GitlabSchema.object_from_id(id, expected_type: ::CustomEmoji)
- end
end
end
end
diff --git a/app/graphql/mutations/customer_relations/contacts/create.rb b/app/graphql/mutations/customer_relations/contacts/create.rb
index 5b4063fb89a..e3a8eba14c8 100644
--- a/app/graphql/mutations/customer_relations/contacts/create.rb
+++ b/app/graphql/mutations/customer_relations/contacts/create.rb
@@ -43,10 +43,6 @@ module Mutations
result = ::CustomerRelations::Contacts::CreateService.new(group: group, current_user: current_user, params: args).execute
{ contact: result.payload, errors: result.errors }
end
-
- def find_object(id:)
- GitlabSchema.object_from_id(id, expected_type: ::Group)
- end
end
end
end
diff --git a/app/graphql/mutations/customer_relations/organizations/create.rb b/app/graphql/mutations/customer_relations/organizations/create.rb
index 43c50a9fb30..9be66830640 100644
--- a/app/graphql/mutations/customer_relations/organizations/create.rb
+++ b/app/graphql/mutations/customer_relations/organizations/create.rb
@@ -41,10 +41,6 @@ module Mutations
result = ::CustomerRelations::Organizations::CreateService.new(group: group, current_user: current_user, params: args).execute
{ organization: result.payload, errors: result.errors }
end
-
- def find_object(id:)
- GitlabSchema.object_from_id(id, expected_type: ::Group)
- end
end
end
end
diff --git a/app/graphql/mutations/saved_replies/base.rb b/app/graphql/mutations/saved_replies/base.rb
index 79761645eb7..d89cb2d06f0 100644
--- a/app/graphql/mutations/saved_replies/base.rb
+++ b/app/graphql/mutations/saved_replies/base.rb
@@ -22,10 +22,6 @@ module Mutations
}
end
end
-
- def find_object(id)
- GitlabSchema.find_by_gid(id)
- end
end
end
end
diff --git a/app/graphql/mutations/saved_replies/destroy.rb b/app/graphql/mutations/saved_replies/destroy.rb
index 655ed9cb798..14223c06d0c 100644
--- a/app/graphql/mutations/saved_replies/destroy.rb
+++ b/app/graphql/mutations/saved_replies/destroy.rb
@@ -12,7 +12,7 @@ module Mutations
description: copy_field_description(Types::SavedReplyType, :id)
def resolve(id:)
- saved_reply = authorized_find!(id)
+ saved_reply = authorized_find!(id: id)
result = ::Users::SavedReplies::DestroyService.new(saved_reply: saved_reply).execute
present_result(result)
end
diff --git a/app/graphql/mutations/saved_replies/update.rb b/app/graphql/mutations/saved_replies/update.rb
index f5dc81614d2..72da66736e9 100644
--- a/app/graphql/mutations/saved_replies/update.rb
+++ b/app/graphql/mutations/saved_replies/update.rb
@@ -20,7 +20,7 @@ module Mutations
description: copy_field_description(Types::SavedReplyType, :content)
def resolve(id:, name:, content:)
- saved_reply = authorized_find!(id)
+ saved_reply = authorized_find!(id: id)
result = ::Users::SavedReplies::UpdateService.new(saved_reply: saved_reply, name: name, content: content).execute
present_result(result)
end
diff --git a/app/graphql/mutations/snippets/base.rb b/app/graphql/mutations/snippets/base.rb
index acaa7b80843..01441926396 100644
--- a/app/graphql/mutations/snippets/base.rb
+++ b/app/graphql/mutations/snippets/base.rb
@@ -10,10 +10,6 @@ module Mutations
private
- def find_object(id:)
- GitlabSchema.object_from_id(id, expected_type: ::Snippet)
- end
-
def authorized_resource?(snippet)
return false if snippet.nil?
diff --git a/app/graphql/mutations/work_items/convert.rb b/app/graphql/mutations/work_items/convert.rb
index b1936027fdc..c4d4927fde2 100644
--- a/app/graphql/mutations/work_items/convert.rb
+++ b/app/graphql/mutations/work_items/convert.rb
@@ -59,10 +59,6 @@ module Mutations
message = format(_('You are not allowed to change the Work Item type to %{name}.'), name: work_item_type.name)
raise_resource_not_available_error! message
end
-
- def find_object(id:)
- GitlabSchema.find_by_gid(id)
- end
end
end
end