プロジェクト

全般

プロフィール

Vote #77032

未完了

Add a permission to prevent user delete issues attachments.

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Attachments_19
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
19
version_id:
0
issue_org_id:
21562
author_id:
140030
assigned_to_id:
0
comments:
4
status_id:
1
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

Now only the Wiki have “Delete attachments” permission, can add this permission to "Issue tracking" too?


journals

Now we use a *ugly hack* to make that only the admin can delete attachment:
<pre>
diff --git a/app/views/attachments/_links.html.erb b/app/views/attachments/_links.html.erb
index 0804b80..bfe351d 100644
--- a/app/views/attachments/_links.html.erb
+++ b/app/views/attachments/_links.html.erb
@@ -13,7 +13,7 @@
<% end %>
<%= " - #{attachment.description}" unless attachment.description.blank? %>
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
- <% if options[:deletable] %>
+ <% if User.current.admin? && options[:deletable] %>
<%= link_to image_tag('delete.png'), attachment_path(attachment),
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,

</pre>
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Patch for Redmine 3.1, 3.2, 3.3 at #24623
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,New,9358,Issue attachment permissions
duplicates,New,24623,Implements CRUD permissions and restrictions to issue attachments

Admin Redmine さんが約4年前に更新

  • カテゴリAttachments_19 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0