#1311 deleting links permission
This commit is contained in:
parent
df53bdabed
commit
586d3491f3
@ -77,18 +77,20 @@
|
||||
title: l(:title_notifications_not_active_activate),
|
||||
class: 'icon-only icon-email-add' %>
|
||||
<% end %>
|
||||
<% # Delete %>
|
||||
<% if @issue.attributes_editable? && User.current.allowed_to?(:file_delete, dmsf_file.project) %>
|
||||
<%= link_to '',
|
||||
<% else %>
|
||||
<span class="icon-only"></span>
|
||||
<span class="icon-only"></span>
|
||||
<% end %>
|
||||
<% # Delete %>
|
||||
<% if @issue.attributes_editable? &&
|
||||
((link && User.current.allowed_to?(:file_manipulation, dmsf_file.project)) ||
|
||||
(!link && User.current.allowed_to?(:file_delete, dmsf_file.project))) %>
|
||||
<%= link_to '',
|
||||
link ? dmsf_link_path(link, commit: 'yes', back_url: issue_path(@issue)) : dmsf_file_path(id: dmsf_file, commit: 'yes', back_url: issue_path(@issue)),
|
||||
data: { confirm: l(:text_are_you_sure) },
|
||||
method: :delete,
|
||||
title: l(:button_delete),
|
||||
class: 'icon-only icon-del' %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<span class="icon-only"></span>
|
||||
<span class="icon-only"></span>
|
||||
<% end %>
|
||||
<% # Approval workflow %>
|
||||
<% wf = DmsfWorkflow.find_by(id: dmsf_file.last_revision.dmsf_workflow_id) if dmsf_file.last_revision.dmsf_workflow_id %>
|
||||
|
||||
@ -267,7 +267,9 @@ module RedmineDmsf
|
||||
title: l(:title_notifications_not_active_activate), class: 'icon icon-email-add')
|
||||
end
|
||||
# Delete
|
||||
if issue.attributes_editable? && User.current.allowed_to?(:file_delete, dmsf_file.project)
|
||||
if issue.attributes_editable? &&
|
||||
((link && User.current.allowed_to?(:file_manipulation, dmsf_file.project)) ||
|
||||
(!link && User.current.allowed_to?(:file_delete, dmsf_file.project)))
|
||||
html << link_to('',
|
||||
link ? dmsf_link_path(link, commit: 'yes') : dmsf_file_path(id: dmsf_file, commit: 'yes'),
|
||||
data: { confirm: l(:text_are_you_sure) }, method: :delete, title: l(:button_delete),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user