Add option to enable/disable email documents under roles
Show Email button only if user has email_documents permission
This commit is contained in:
parent
8c327b387a
commit
bd8b5b7a1d
@ -110,7 +110,7 @@
|
||||
<%= hidden_field_tag('action') %>
|
||||
<div class="controls" style="float: left">
|
||||
<%= submit_tag(l(:button_download), :title => l(:title_download_checked), :name => 'download_entries') if @file_view_allowed %>
|
||||
<%= submit_tag(l(:field_mail), :title => l(:title_send_checked_by_email), :name => 'email_entries') if @file_view_allowed %>
|
||||
<%= submit_tag(l(:field_mail), :title => l(:title_send_checked_by_email), :name => 'email_entries') if (@file_view_allowed && User.current.allowed_to?(:email_documents, @project)) %>
|
||||
<% if @file_delete_allowed%>
|
||||
<%= submit_tag(l(:button_delete), :title => l(:title_delete_checked), :name => 'delete_entries') if @file_delete_allowed %>
|
||||
<% end %>
|
||||
@ -291,4 +291,4 @@
|
||||
</script>
|
||||
<% end %>
|
||||
|
||||
<%= render(:partial => 'dmsf_upload/multi_upload') if (@file_manipulation_allowed && !@locked_for_user) %>
|
||||
<%= render(:partial => 'dmsf_upload/multi_upload') if (@file_manipulation_allowed && !@locked_for_user) %>
|
||||
|
||||
3
init.rb
3
init.rb
@ -70,6 +70,7 @@ Redmine::Plugin.register :redmine_dmsf do
|
||||
:dmsf_files_copy => [:new, :create, :move],
|
||||
:dmsf_workflows => [:log]},
|
||||
:read => true
|
||||
permission :email_documents, {}
|
||||
permission :folder_manipulation,
|
||||
{:dmsf => [:new, :create, :delete, :edit, :save, :edit_root, :save_root, :lock, :unlock, :notify_activate, :notify_deactivate, :restore]}
|
||||
permission :file_manipulation,
|
||||
@ -178,4 +179,4 @@ end
|
||||
Redmine::Search.map do |search|
|
||||
search.register :dmsf_files
|
||||
search.register :dmsf_folders
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user