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
6d32c609
Commit
6d32c609
authored
Oct 30, 2020
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the epic: parameter to the issue service
parent
96a2b3db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
23 deletions
+2
-23
app/graphql/mutations/base_mutation.rb
app/graphql/mutations/base_mutation.rb
+0
-4
ee/app/graphql/ee/mutations/issues/update.rb
ee/app/graphql/ee/mutations/issues/update.rb
+2
-19
No files found.
app/graphql/mutations/base_mutation.rb
View file @
6d32c609
...
...
@@ -34,9 +34,5 @@ module Mutations
true
end
end
def
can?
(
ability
,
subject
)
Ability
.
allowed?
(
current_user
,
ability
,
subject
)
end
end
end
ee/app/graphql/ee/mutations/issues/update.rb
View file @
6d32c609
...
...
@@ -16,25 +16,8 @@ module EE
end
def
resolve
(
**
args
)
if
args
.
key?
(
:epic
)
args
[
:epic_id
]
=
epic_id
(
args
.
delete
(
:epic
))
end
super
(
**
args
)
end
private
def
epic_id
(
epic
)
return
unless
epic
authorize_epic!
(
epic
)
epic
.
id
end
def
authorize_epic!
(
epic
)
return
if
can?
(
:admin_epic
,
epic
)
super
rescue
::
Gitlab
::
Access
::
AccessDeniedError
raise_resource_not_available_error!
end
end
...
...
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