summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2023-03-02 04:36:43 +0000
committerGo MAEDA <maeda@farend.jp>2023-03-02 04:36:43 +0000
commit16f303094ddbbff44fa989891e1ee631f05402ae (patch)
tree07ac6592677d8819152970842e260e347a3cabf6 /app/models
parentac3826ba21d91033e22ee91313b0d3f7b8da50cf (diff)
downloadredmine-16f303094ddbbff44fa989891e1ee631f05402ae.tar.gz
redmine-16f303094ddbbff44fa989891e1ee631f05402ae.zip
Merged r22122 from trunk to 5.0-stable (#38297).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@22123 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r--app/models/issue.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index a7d15a450..7ae800751 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -195,6 +195,10 @@ class Issue < ActiveRecord::Base
)
end
+ def attachments_addable?(user=User.current)
+ attributes_editable?(user) || notes_addable?(user)
+ end
+
# Overrides Redmine::Acts::Attachable::InstanceMethods#attachments_editable?
def attachments_editable?(user=User.current)
attributes_editable?(user)