diff options
author | Sean McGivern <sean@gitlab.com> | 2017-10-26 14:04:07 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-10-26 17:53:55 +0300 |
commit | 17b4367045ec7943717d11cf1cafc19560da5f40 (patch) | |
tree | 0a4341aa8aaca5529bdd3f8096edb06a8f78148d /app/controllers/projects/issues_controller.rb | |
parent | f913f7a1caa492fdaa06c4ebe0111a080079ff8f (diff) |
Revert "Merge branch '36670-remove-edit-form' into 'master'"
This reverts commit 915e35a2992a4e51db2ac32aac8d7a29b1f4449e, reversing
changes made to 9533786f522e358f372d8a0ec4b4990ae9d88f37.
Diffstat (limited to 'app/controllers/projects/issues_controller.rb')
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index b7a108a0ebd..fe1334c0cfe 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -16,7 +16,7 @@ class Projects::IssuesController < Projects::ApplicationController before_action :authorize_create_issue!, only: [:new, :create] # Allow modify issue - before_action :authorize_update_issue!, only: [:update, :move] + before_action :authorize_update_issue!, only: [:edit, :update, :move] # Allow create a new branch and empty WIP merge request from current issue before_action :authorize_create_merge_request!, only: [:create_merge_request] @@ -63,6 +63,10 @@ class Projects::IssuesController < Projects::ApplicationController respond_with(@issue) end + def edit + respond_with(@issue) + end + def show @noteable = @issue @note = @project.notes.new(noteable: @issue) @@ -122,6 +126,10 @@ class Projects::IssuesController < Projects::ApplicationController @issue = Issues::UpdateService.new(project, current_user, update_params).execute(issue) respond_to do |format| + format.html do + recaptcha_check_with_fallback { render :edit } + end + format.json do render_issue_json end |