mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
修改工单里的项目根据id寻找
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
class IssuesController < ApplicationController
|
class IssuesController < ApplicationController
|
||||||
before_action :require_login, except: [:index, :show]
|
before_action :require_login, except: [:index, :show]
|
||||||
before_action :find_project
|
before_action :find_project_issue
|
||||||
before_action :set_project_and_user
|
before_action :set_project_and_user
|
||||||
before_action :check_project_public, only: [:index ,:show, :copy, :index_chosen, :close_issue]
|
before_action :check_project_public, only: [:index ,:show, :copy, :index_chosen, :close_issue]
|
||||||
before_action :check_issue_permission, except: [:index, :show, :index_chosen]
|
before_action :check_issue_permission, except: [:index, :show, :index_chosen]
|
||||||
@@ -430,4 +430,10 @@ class IssuesController < ApplicationController
|
|||||||
end
|
end
|
||||||
all_branches
|
all_branches
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def find_project_issue
|
||||||
|
project_id = params[:id]
|
||||||
|
@project = Project.find_by(id: project_id)
|
||||||
|
render_not_found("未找到’#{project}’相关的项目") unless @project
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user