Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3b2b5aa2
Commit
3b2b5aa2
authored
May 11, 2020
by
Alan Paruszewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change from projectId to id in RemoveProjectFromSecurityDashboard
parent
9ea5536e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
6 deletions
+12
-6
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+1
-1
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+1
-1
ee/app/graphql/mutations/instance_security_dashboard/remove_project.rb
...l/mutations/instance_security_dashboard/remove_project.rb
+3
-3
ee/changelogs/unreleased/214583-change-mutation-input-to-remove-projects-from-security-dashboar.yml
...ation-input-to-remove-projects-from-security-dashboar.yml
+6
-0
ee/spec/graphql/mutations/instance_security_dashboard/remove_project_spec.rb
...ations/instance_security_dashboard/remove_project_spec.rb
+1
-1
No files found.
doc/api/graphql/reference/gitlab_schema.graphql
View file @
3b2b5aa2
...
...
@@ -8414,7 +8414,7 @@ input RemoveProjectFromSecurityDashboardInput {
"""
ID
of
the
project
to
remove
from
the
Instance
Security
Dashboard
"""
projectI
d
:
ID
!
i
d
:
ID
!
}
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
3b2b5aa2
...
...
@@ -24721,7 +24721,7 @@
"fields"
:
null
,
"inputFields"
:
[
{
"name"
:
"
projectI
d"
,
"name"
:
"
i
d"
,
"description"
:
"ID of the project to remove from the Instance Security Dashboard"
,
"type"
:
{
"kind"
:
"NON_NULL"
,
...
...
ee/app/graphql/mutations/instance_security_dashboard/remove_project.rb
View file @
3b2b5aa2
...
...
@@ -7,15 +7,15 @@ module Mutations
authorize
:read_instance_security_dashboard
argument
:
project_
id
,
GraphQL
::
ID_TYPE
,
argument
:id
,
GraphQL
::
ID_TYPE
,
required:
true
,
description:
'ID of the project to remove from the Instance Security Dashboard'
def
resolve
(
project_
id
:)
def
resolve
(
id
:)
dashboard
=
authorized_find!
raise_resource_not_available_error!
unless
dashboard
.
feature_available?
(
:security_dashboard
)
result
=
remove_project
(
extract_project_id
(
project_
id
))
result
=
remove_project
(
extract_project_id
(
id
))
{
errors:
result
.
zero?
?
[
'The project does not belong to your dashboard or you don\'t have permission to perform this action'
]
:
[]
...
...
ee/changelogs/unreleased/214583-change-mutation-input-to-remove-projects-from-security-dashboar.yml
0 → 100644
View file @
3b2b5aa2
---
title
:
Modify GraphQL mutation for removing project from Instance Security Dashboard
to use id instead of projectId
merge_request
:
31575
author
:
type
:
changed
ee/spec/graphql/mutations/instance_security_dashboard/remove_project_spec.rb
View file @
3b2b5aa2
...
...
@@ -17,7 +17,7 @@ describe Mutations::InstanceSecurityDashboard::RemoveProject do
already_added_project
.
add_developer
(
user
)
end
subject
{
mutation
.
resolve
(
project_
id:
project_id
)
}
subject
{
mutation
.
resolve
(
id:
project_id
)
}
context
'when user is not logged_in'
do
let
(
:current_user
)
{
nil
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment