diff options
author | Jacopo <beschi.jacopo@gmail.com> | 2018-04-05 17:17:02 +0200 |
---|---|---|
committer | Jacopo <beschi.jacopo@gmail.com> | 2018-04-19 13:56:36 +0200 |
commit | 5a29a304be5fc86a5bbe61764c47cdd8069e2103 (patch) | |
tree | 97e0e8ac539e7e03fd562f2b3dc77611c246acd1 /app/controllers/projects | |
parent | 674702e02e2654e539e1b3c9a12d6b9897a614cf (diff) | |
download | gitlab-ce-5a29a304be5fc86a5bbe61764c47cdd8069e2103.tar.gz |
Shows new branch/mr button even when branch exists
Diffstat (limited to 'app/controllers/projects')
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 767e492f566..d69015c8665 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -134,11 +134,11 @@ class Projects::IssuesController < Projects::ApplicationController def can_create_branch can_create = current_user && can?(current_user, :push_code, @project) && - @issue.can_be_worked_on?(current_user) + @issue.can_be_worked_on? respond_to do |format| format.json do - render json: { can_create_branch: can_create, has_related_branch: @issue.has_related_branch? } + render json: { can_create_branch: can_create, suggested_branch_name: @issue.suggested_branch_name } end end end @@ -177,7 +177,7 @@ class Projects::IssuesController < Projects::ApplicationController end def authorize_create_merge_request! - render_404 unless can?(current_user, :push_code, @project) && @issue.can_be_worked_on?(current_user) + render_404 unless can?(current_user, :push_code, @project) && @issue.can_be_worked_on? end def render_issue_json |