fixed 流水线没有查看组织的权限
This commit is contained in:
parent
4255966a5b
commit
2a0d4d6f45
|
@ -1,10 +1,12 @@
|
|||
class Api::Pm::PipelinesController < Api::Pm::BaseController
|
||||
include RepositoriesHelper
|
||||
before_action :require_operate_above, except: [:upload_results, :run_results]
|
||||
|
||||
def index
|
||||
@owner = Owner.find_by(login: params[:owner_id].to_s) || Owner.find_by(id: params[:owner_id].to_s)
|
||||
tip_exception('组织未找到') if @owner.blank?
|
||||
unless @owner.is_a?(Organization) && @owner.is_member?(current_user.id)
|
||||
tip_exception('没有查看组织的权限')
|
||||
end
|
||||
@project_ids = @owner.projects.ids
|
||||
project_gpids = @owner.projects.pluck(:gpid)
|
||||
action_runs = Gitea::ActionRun.where(owner_id: @owner.gitea_uid)
|
||||
|
|
Loading…
Reference in New Issue