diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-09-13 10:17:15 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-09-13 10:17:15 +0000 |
commit | e124da5488291dc10fab0d17ebbf54b7f70b436b (patch) | |
tree | f1575d7a2bed12d30bb5711fcddd7c06c533d7be /app/models/version.rb | |
parent | 34beae1c7a786c18c1b3e2d1ba3b10fa14d903b1 (diff) | |
download | redmine-e124da5488291dc10fab0d17ebbf54b7f70b436b.tar.gz redmine-e124da5488291dc10fab0d17ebbf54b7f70b436b.zip |
Fixed: Files assigned to a version can not be deleted if Issue Tracking module is disabled (#17163).
Patch by Michael Esemplare.
git-svn-id: http://svn.redmine.org/redmine/trunk@13390 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/version.rb')
-rw-r--r-- | app/models/version.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/version.rb b/app/models/version.rb index 76853e4b0..1d06360ef 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -60,6 +60,10 @@ class Version < ActiveRecord::Base project.present? && project.attachments_visible?(*args) end + def attachments_deletable?(usr=User.current) + project.present? && project.attachments_deletable?(usr) + end + def start_date @start_date ||= fixed_issues.minimum('start_date') end |