Fixed access to BuildList
This commit is contained in:
parent
aa97eb1863
commit
910446954c
|
@ -5,7 +5,7 @@ class BuildListsController < ApplicationController
|
|||
before_filter :find_arches, :only => [:index, :filter, :all]
|
||||
before_filter :find_project_versions, :only => [:index, :filter]
|
||||
before_filter :find_build_list_by_bs, :only => [:status_build, :pre_build, :post_build]
|
||||
before_filter :check_global_access, :except => [:status_build, :post_build, :pre_build, :circle_build, :new_bbdt, :show]
|
||||
before_filter :check_global_access, :except => [:status_build, :post_build, :pre_build, :circle_build, :new_bbdt, :show, :publish, :cancel]
|
||||
|
||||
def all
|
||||
if params[:filter]
|
||||
|
@ -25,6 +25,7 @@ class BuildListsController < ApplicationController
|
|||
|
||||
def cancel
|
||||
build_list = BuildList.find(params[:id])
|
||||
can_perform? build_list.project if build_list
|
||||
if build_list.delete_build_list
|
||||
redirect_to :back, :notice => t('layout.build_lists.cancel_successed')
|
||||
else
|
||||
|
@ -53,6 +54,7 @@ class BuildListsController < ApplicationController
|
|||
end
|
||||
|
||||
def publish
|
||||
can_perform? @project if @project
|
||||
@build_list = @project.build_lists.find(params[:id])
|
||||
@build_list.publish
|
||||
|
||||
|
|
Loading…
Reference in New Issue