fix: create pr authorize tip

This commit is contained in:
yystopf 2021-11-30 20:23:37 +08:00
parent 4e3c8e414c
commit 6f7899d16f
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ class PullRequestsController < ApplicationController
end
def create
return render_forbidden("你没有权限操作.") unless @project.operator?(current_user)
return normal_status(-1, "您不是目标分支开发者,没有权限,请联系目标分支作者.") unless @project.operator?(current_user)
ActiveRecord::Base.transaction do
@pull_request, @gitea_pull_request = PullRequests::CreateService.call(current_user, @owner, @project, params)
if @gitea_pull_request[:status] == :success