1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-19 23:11:12 +00:00

Same permission for editing the issue and its attachments.

git-svn-id: http://svn.redmine.org/redmine/trunk@15476 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2016-06-06 06:41:06 +00:00
parent c87783d50d
commit 026bcc4236

View 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)