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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
30aa901d
Commit
30aa901d
authored
Jul 31, 2018
by
Lukas Eipert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ensure that merge request widget serializer exposes `can_create_issue`
parent
02e35a0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
app/serializers/merge_request_widget_entity.rb
app/serializers/merge_request_widget_entity.rb
+4
-0
spec/fixtures/api/schemas/entities/merge_request_widget.json
spec/fixtures/api/schemas/entities/merge_request_widget.json
+1
-0
No files found.
app/serializers/merge_request_widget_entity.rb
View file @
30aa901d
...
...
@@ -132,6 +132,10 @@ class MergeRequestWidgetEntity < IssuableEntity
can?
(
request
.
current_user
,
:create_note
,
merge_request
)
end
expose
:can_create_issue
do
|
merge_request
|
can?
(
current_user
,
:create_issue
,
merge_request
.
project
)
end
expose
:can_update
do
|
merge_request
|
can?
(
request
.
current_user
,
:update_merge_request
,
merge_request
)
end
...
...
spec/fixtures/api/schemas/entities/merge_request_widget.json
View file @
30aa901d
...
...
@@ -81,6 +81,7 @@
"can_revert_on_current_merge_request"
:
{
"type"
:
[
"boolean"
,
"null"
]
},
"can_cherry_pick_on_current_merge_request"
:
{
"type"
:
[
"boolean"
,
"null"
]
},
"can_create_note"
:
{
"type"
:
"boolean"
},
"can_create_issue"
:
{
"type"
:
"boolean"
},
"can_update"
:
{
"type"
:
"boolean"
}
},
"additionalProperties"
:
false
...
...
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