Rename is_rpm to is_package in ability.rb

This commit is contained in:
Vladimir Sharshov 2012-05-18 01:07:04 +04:00
parent 50249a68b6
commit aceb9e61fc
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ class Ability
can [:read, :related], BuildList, :project => {:owner_type => 'User', :owner_id => user.id}
can [:read, :related], BuildList, :project => {:owner_type => 'Group', :owner_id => user.group_ids}
can(:read, BuildList, read_relations_for('build_lists', 'projects')) {|build_list| can? :read, build_list.project}
can([:create, :update], BuildList) {|build_list| build_list.project.is_rpm && can?(:write, build_list.project)}
can([:create, :update], BuildList) {|build_list| build_list.project.is_package && can?(:write, build_list.project)}
can(:publish, BuildList) do |build_list|
build_list.can_publish? and build_list.save_to_platform.released ? local_admin?(build_list.save_to_platform) : can?(:write, build_list.project)