Merge pull request #482 from yinhaoliew/master

Add option to enable/disable email documents under roles
This commit is contained in:
Karel Picman 2015-12-04 08:25:47 +01:00
commit 8faac6c9ae
2 changed files with 4 additions and 3 deletions

View File

@ -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) %>

View File

@ -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