Only show autowatcch option, if user can view issues

This commit is contained in:
Alexander Meindl 2017-08-14 08:22:57 +02:00
parent f459c03efc
commit e3ef19794c

View File

@ -1,4 +1,4 @@
<% if Additionals.settings[:issue_autowatch_involved].to_i == 1 %>
<% if Additionals.settings[:issue_autowatch_involved].to_i == 1 && User.current.allowed_to?(:view_issues, nil, global: true) %>
<%= labelled_fields_for :pref, @user.pref do |pref_fields| %>
<p><%= pref_fields.check_box :autowatch_involved_issue %></p>
<% end %>