]> source.dussan.org Git - redmine.git/commitdiff
Same permission for editing the issue and its attachments.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 6 Jun 2016 06:41:06 +0000 (06:41 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 6 Jun 2016 06:41:06 +0000 (06:41 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15476 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue.rb

index 0044e73b2c0cd5de77346a6b38a232991f739155..e0b99e4e6bb0fff5e0f9163d90f4abb0a3f2d921 100644 (file)
@@ -182,6 +182,11 @@ class Issue < ActiveRecord::Base
     user_tracker_permission?(user, :edit_issues)
   end
 
+  # Overrides Redmine::Acts::Attachable::InstanceMethods#attachments_editable?
+  def attachments_editable?(user=User.current)
+    attributes_editable?(user)
+  end
+
   # Returns true if user or current user is allowed to add notes to the issue
   def notes_addable?(user=User.current)
     user_tracker_permission?(user, :add_issue_notes)