diff options
author | Robert Speicher <rspeicher@gmail.com> | 2019-07-29 13:19:50 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2019-07-29 13:19:50 -0500 |
commit | fe22704a203111ab2146143a4ff9d2e1256aecc7 (patch) | |
tree | 1bafbd0bdfbd498220cef09c94eb71bf4f9e072f /app/serializers | |
parent | f039d592aa6203502be487801777167e433ad9d2 (diff) | |
parent | cc7b15fe935d41aab85918eb7ae7c0ef81f8bfb0 (diff) | |
download | gitlab-ce-fe22704a203111ab2146143a4ff9d2e1256aecc7.tar.gz |
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/issue_entity.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/serializers/issue_entity.rb b/app/serializers/issue_entity.rb index 36e601f45c5..82139855760 100644 --- a/app/serializers/issue_entity.rb +++ b/app/serializers/issue_entity.rb @@ -16,9 +16,14 @@ class IssueEntity < IssuableEntity expose :discussion_locked expose :assignees, using: API::Entities::UserBasic expose :due_date - expose :moved_to_id expose :project_id + expose :moved_to_id do |issue| + if issue.moved_to_id.present? && can?(request.current_user, :read_issue, issue.moved_to) + issue.moved_to_id + end + end + expose :web_url do |issue| project_issue_path(issue.project, issue) end |