summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-06-06 06:41:06 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-06-06 06:41:06 +0000
commit026bcc4236138dd26e56c674784f58194fd172f7 (patch)
tree11c2876118aa679f748f8171e61e3780c40980cc /app
parentc87783d50d559915847ffcfc9c95bde274eaad0d (diff)
downloadredmine-026bcc4236138dd26e56c674784f58194fd172f7.tar.gz
redmine-026bcc4236138dd26e56c674784f58194fd172f7.zip
Same permission for editing the issue and its attachments.
git-svn-id: http://svn.redmine.org/redmine/trunk@15476 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/issue.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 0044e73b2..e0b99e4e6 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -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)