From 28e2d4041f8a359f645004b6c0c989ba2d483099 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 4 Mar 2016 14:24:24 +1100 Subject: [PATCH] Hide create-enterprise-group button from non-admins Only admin users can create groups. The button was still displayed for users that owned a group. Unused HTML attributes were removed from that button as well. --- app/views/admin/enterprise_groups/index.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/admin/enterprise_groups/index.html.haml b/app/views/admin/enterprise_groups/index.html.haml index 13bc19e364..e78dadc72c 100644 --- a/app/views/admin/enterprise_groups/index.html.haml +++ b/app/views/admin/enterprise_groups/index.html.haml @@ -1,9 +1,9 @@ = content_for :page_title do Enterprise Groups -= content_for :page_actions do - %li#new_enterprise_group_link - = button_link_to "New Enterprise Group", main_app.new_admin_enterprise_group_path, :icon => 'add', :id => 'admin_new_enterprise_group_link' +- if admin_user? + = content_for :page_actions do + %li= button_link_to "New Enterprise Group", main_app.new_admin_enterprise_group_path %table.index#listing_enterprise_groups %thead