Merge pull request #456 from warpc/455-publish
[refs #455] Фикс публикации сборочного листа.
This commit is contained in:
commit
7a3e632199
|
@ -64,7 +64,8 @@ class Ability
|
||||||
can [:read, :related], BuildList, :project => {:owner_type => 'User', :owner_id => user.id}
|
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, :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(:read, BuildList, read_relations_for('build_lists', 'projects')) {|build_list| can? :read, build_list.project}
|
||||||
can(:create, BuildList) {|build_list| build_list.project.is_rpm && can?(:write, build_list.project)}
|
can([:create, :update], BuildList) {|build_list| build_list.project.is_rpm && can?(:write, build_list.project)}
|
||||||
|
|
||||||
can(:publish, BuildList) do |build_list|
|
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)
|
build_list.can_publish? and build_list.save_to_platform.released ? local_admin?(build_list.save_to_platform) : can?(:write, build_list.project)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue