Fixed ability to publish build_list into testing

This commit is contained in:
Vokhmin Alexey V 2013-11-07 13:45:19 +04:00
parent 21efb631b6
commit cbf588c50b
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ class Ability
can [:read, :log, :related, :everything], BuildList, :project => {:owner_type => 'Group', :owner_id => user.group_ids} can [:read, :log, :related, :everything], BuildList, :project => {:owner_type => 'Group', :owner_id => user.group_ids}
can([:read, :log, :everything, :list], BuildList, read_relations_for('build_lists', 'projects')) {|build_list| can? :read, build_list.project} can([:read, :log, :everything, :list], BuildList, read_relations_for('build_lists', 'projects')) {|build_list| can? :read, build_list.project}
can(:publish_into_testing, BuildList) { |build_list| can?(:write, build_list.project) && can?(:show, build_list.build_for_platform) } can(:publish_into_testing, BuildList) { |build_list| can?(:create, build_list) }
can(:create, BuildList) {|build_list| can(:create, BuildList) {|build_list|
build_list.project.is_package && build_list.project.is_package &&
can?(:write, build_list.project) && can?(:write, build_list.project) &&