From f5f3e5fac27b3f661bbd9c23372f13bc63bc964c Mon Sep 17 00:00:00 2001 From: chrbo Date: Fri, 27 Nov 2015 11:51:16 +0100 Subject: [PATCH] #4519: fixed email visibility --- app/views/_issue_edit.erb | 2 +- lib/helpdesk_hooks.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) mode change 100755 => 100644 app/views/_issue_edit.erb mode change 100755 => 100644 lib/helpdesk_hooks.rb diff --git a/app/views/_issue_edit.erb b/app/views/_issue_edit.erb old mode 100755 new mode 100644 index cf6e61b..9ec4973 --- a/app/views/_issue_edit.erb +++ b/app/views/_issue_edit.erb @@ -1 +1 @@ -<%= check_box_tag('send_to_owner', "true", (send_to_owner_default == "1")) %> <%=h t('label_support_checkbox') %> (<%=h email %>) +<%= check_box_tag('send_to_owner', "true", (send_to_owner_default == "1")) %> <%=h t('label_support_checkbox') %><% if email_visible %> (<%=h email %>)<% end %> diff --git a/lib/helpdesk_hooks.rb b/lib/helpdesk_hooks.rb old mode 100755 new mode 100644 index dee7287..eb32bbe --- a/lib/helpdesk_hooks.rb +++ b/lib/helpdesk_hooks.rb @@ -14,6 +14,7 @@ def view_issues_edit_notes_bottom(context={}) :partial => "issue_edit", :locals => { :email => owner_email, + :email_visible => c.visible_by?(p), :send_to_owner_default => (send_to_owner_default.present? && send_to_owner_default || false) } )