From 9470fe49ccd3e24cfd1d77e849220799522d8758 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Mon, 8 Apr 2013 14:17:05 +0400 Subject: [PATCH] #84: update access rights for mass_builds page --- app/views/platforms/base/_sidebar.html.haml | 2 +- app/views/platforms/mass_builds/index.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/platforms/base/_sidebar.html.haml b/app/views/platforms/base/_sidebar.html.haml index b5a857be5..4edefc28a 100644 --- a/app/views/platforms/base/_sidebar.html.haml +++ b/app/views/platforms/base/_sidebar.html.haml @@ -13,7 +13,7 @@ - if can? :show, @platform %li{:class => (act == :index && contr == :maintainers) ? 'active' : nil} = link_to t("layout.platforms.maintainers"), platform_maintainers_path(@platform) - - if can? :show, @platform + - if @platform.main? && can?(:show, @platform) %li{:class => (contr == :mass_builds && [:index, :create].include?(act)) ? 'active' : ''} = link_to t("layout.platforms.mass_build"), platform_mass_builds_path(@platform) - if can? :read, @platform.products.build diff --git a/app/views/platforms/mass_builds/index.html.haml b/app/views/platforms/mass_builds/index.html.haml index d965430c2..c82ed00b6 100644 --- a/app/views/platforms/mass_builds/index.html.haml +++ b/app/views/platforms/mass_builds/index.html.haml @@ -1,7 +1,7 @@ = render 'platforms/base/submenu' = render 'platforms/base/sidebar' -= render 'form' if can? :edit, @platform += render 'form' if can? :create, @platform.mass_builds.new %table.tablesorter.unbordered{:cellpadding => "0", :cellspacing => "0"} %thead