From c6f2a3d77e1215eb27efc8dac479432dc57305a5 Mon Sep 17 00:00:00 2001 From: Luciano Prestes Cavalcanti Date: Fri, 13 Mar 2015 15:02:48 -0300 Subject: [PATCH] Show profile is a template only to environment admin --- views/profile_editor/edit_software_community.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/profile_editor/edit_software_community.html.erb b/views/profile_editor/edit_software_community.html.erb index 86ec658..acc0bb5 100644 --- a/views/profile_editor/edit_software_community.html.erb +++ b/views/profile_editor/edit_software_community.html.erb @@ -14,7 +14,7 @@ <%= labelled_form_for :profile_data, :html => { :id => 'profile-data', :multipart => true } do |f| %> - <% if user.has_permission?('manage_environment_templates', profile.environment) %> + <% if environment.admins.include?(user) %>
<%= labelled_check_box(_('This profile is a template'), 'profile_data[is_template]', true, @profile.is_template) %>
-- libgit2 0.21.2