diff --git a/app/models/ability.rb b/app/models/ability.rb index 8f9550cdd..03124c51e 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -81,7 +81,7 @@ class Ability can [:read, :related, :members], Platform, :owner_type => 'Group', :owner_id => user.group_ids can([:read, :related, :members], Platform, read_relations_for('platforms')) {|platform| local_reader? platform} can([:update, :members], Platform) {|platform| local_admin? platform} - can([:destroy, :members, :add_member, :remove_member, :remove_members, :build_all] , Platform) {|platform| owner? platform} + can([:destroy, :members, :add_member, :remove_member, :remove_members, :build_all, :mass_builds] , Platform) {|platform| owner? platform} can :autocomplete_user_uname, Platform can [:read, :projects_list], Repository, :platform => {:visibility => 'open'} @@ -123,7 +123,7 @@ class Ability cannot [:members, :add_member, :remove_member, :remove_members], Platform, :platform_type => 'personal' cannot [:create, :update, :destroy, :clone], Product, :platform => {:platform_type => 'personal'} - cannot [:clone, :build_all], Platform, :platform_type => 'personal' + cannot [:clone, :build_all, :mass_builds], Platform, :platform_type => 'personal' can :create, Subscribe do |subscribe| !subscribe.subscribeable.subscribes.exists?(:user_id => user.id) diff --git a/app/views/platforms/platforms/show.html.haml b/app/views/platforms/platforms/show.html.haml index 3066eef08..93e368d08 100644 --- a/app/views/platforms/platforms/show.html.haml +++ b/app/views/platforms/platforms/show.html.haml @@ -30,8 +30,8 @@ %td= @platform.distrib_type .buttons_block - - if can? :build_all, @platform - = link_to t("layout.platforms.build_all"), build_all_platform_path(@platform), :confirm => I18n.t("layout.confirm"), :method => :post, :class => "button left_floated" + - if can? :mass_builds, @platform + = link_to t("layout.platforms.mass_build"), mass_builds_platform_path(@platform), :class => "button left_floated" = link_to I18n.t("layout.platforms.clone"), clone_platform_path(@platform), :class => "button left_floated" if can? :clone, @platform = render 'connection_info' if @platform.platform_type == 'personal' and @platform.visibility == 'open'