Merged ajax_upload branch (#3957).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10977 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2012-12-10 20:09:41 +00:00
1 parent 2304f5d42c
commit ef25210aca
22 files changed
+442 -83

No files matched your search

+10 -2
View File
@@ -154,11 +154,19 @@ class Attachment < ActiveRecord::Base
end
def visible?(user=User.current)
container && container.attachments_visible?(user)
if container_id
container && container.attachments_visible?(user)
else
author == user
end
end
def deletable?(user=User.current)
container && container.attachments_deletable?(user)
if container_id
container && container.attachments_deletable?(user)
else
author == user
end
end
def image?