summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-04-15 13:23:13 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-04-15 13:23:13 +0000
commitf16cddd57ae87b820d24dd378ef036c52a4f15d4 (patch)
treec99481dd328c4cf9868af6422278ab8bd4bccede /vendor
parent37205a8991920e3bc403f52711308878fea05553 (diff)
downloadredmine-f16cddd57ae87b820d24dd378ef036c52a4f15d4.tar.gz
redmine-f16cddd57ae87b820d24dd378ef036c52a4f15d4.zip
Private issues (#7414).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5466 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'vendor')
-rw-r--r--vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb b/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb
index e5acdc499..d59c89110 100644
--- a/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb
+++ b/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb
@@ -1,5 +1,5 @@
# Redmine - project management software
-# Copyright (C) 2006-2008 Jean-Philippe Lang
+# Copyright (C) 2006-2011 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -44,11 +44,13 @@ module Redmine
end
def attachments_visible?(user=User.current)
- user.allowed_to?(self.class.attachable_options[:view_permission], self.project)
+ (respond_to?(:visible?) ? visible?(user) : true) &&
+ user.allowed_to?(self.class.attachable_options[:view_permission], self.project)
end
def attachments_deletable?(user=User.current)
- user.allowed_to?(self.class.attachable_options[:delete_permission], self.project)
+ (respond_to?(:visible?) ? visible?(user) : true) &&
+ user.allowed_to?(self.class.attachable_options[:delete_permission], self.project)
end
def initialize_unsaved_attachments