Revision 442:753f1380d6bc vendor/plugins/acts_as_attachable
| vendor/plugins/acts_as_attachable/.svn/all-wcprops | ||
|---|---|---|
| 1 |
K 25 |
|
| 2 |
svn:wc:ra_dav:version-url |
|
| 3 |
V 72 |
|
| 4 |
/svn/!svn/ver/5878/branches/1.2-stable/vendor/plugins/acts_as_attachable |
|
| 5 |
END |
|
| vendor/plugins/acts_as_attachable/.svn/entries | ||
|---|---|---|
| 1 | 1 |
10 |
| 2 | 2 |
|
| 3 | 3 |
dir |
| 4 |
4993
|
|
| 5 |
http://redmine.rubyforge.org/svn/trunk/vendor/plugins/acts_as_attachable
|
|
| 4 |
6000
|
|
| 5 |
http://redmine.rubyforge.org/svn/branches/1.2-stable/vendor/plugins/acts_as_attachable
|
|
| 6 | 6 |
http://redmine.rubyforge.org/svn |
| 7 | 7 |
|
| 8 | 8 |
|
| 9 | 9 |
|
| 10 |
2010-03-03T17:05:00.967826Z
|
|
| 11 |
3528
|
|
| 12 |
edavis10
|
|
| 10 |
2011-04-15T13:23:13.506236Z
|
|
| 11 |
5466
|
|
| 12 |
jplang
|
|
| 13 | 13 |
|
| 14 | 14 |
|
| 15 | 15 |
|
| ... | ... | |
| 32 | 32 |
|
| 33 | 33 |
|
| 34 | 34 |
|
| 35 |
2011-03-03T11:05:12.000000Z
|
|
| 35 |
2011-06-06T13:15:00.000000Z
|
|
| 36 | 36 |
b215588c95e69b4bb8f91ad91606bfbe |
| 37 | 37 |
2008-12-09T16:54:46.963649Z |
| 38 | 38 |
2116 |
| vendor/plugins/acts_as_attachable/lib/.svn/entries | ||
|---|---|---|
| 1 | 1 |
10 |
| 2 | 2 |
|
| 3 | 3 |
dir |
| 4 |
4993
|
|
| 5 |
http://redmine.rubyforge.org/svn/trunk/vendor/plugins/acts_as_attachable/lib
|
|
| 4 |
6000
|
|
| 5 |
http://redmine.rubyforge.org/svn/branches/1.2-stable/vendor/plugins/acts_as_attachable/lib
|
|
| 6 | 6 |
http://redmine.rubyforge.org/svn |
| 7 | 7 |
|
| 8 | 8 |
|
| 9 | 9 |
|
| 10 |
2010-03-03T17:05:00.967826Z
|
|
| 11 |
3528
|
|
| 12 |
edavis10
|
|
| 10 |
2011-04-15T13:23:13.506236Z
|
|
| 11 |
5466
|
|
| 12 |
jplang
|
|
| 13 | 13 |
|
| 14 | 14 |
|
| 15 | 15 |
|
| ... | ... | |
| 32 | 32 |
|
| 33 | 33 |
|
| 34 | 34 |
|
| 35 |
2011-03-03T11:05:12.000000Z
|
|
| 36 |
982227c44f1fe848c8aeed862ea027f3
|
|
| 37 |
2010-03-03T17:05:00.967826Z
|
|
| 38 |
3528
|
|
| 39 |
edavis10
|
|
| 35 |
2011-06-06T13:18:33.000000Z
|
|
| 36 |
0c00ea7475f5fb3e2232c35f4747e2d2
|
|
| 37 |
2011-04-15T13:23:13.506236Z
|
|
| 38 |
5466
|
|
| 39 |
jplang
|
|
| 40 | 40 |
has-props |
| 41 | 41 |
|
| 42 | 42 |
|
| ... | ... | |
| 58 | 58 |
|
| 59 | 59 |
|
| 60 | 60 |
|
| 61 |
2387
|
|
| 61 |
2515
|
|
| 62 | 62 |
|
| vendor/plugins/acts_as_attachable/lib/.svn/text-base/acts_as_attachable.rb.svn-base | ||
|---|---|---|
| 1 | 1 |
# Redmine - project management software |
| 2 |
# Copyright (C) 2006-2008 Jean-Philippe Lang
|
|
| 2 |
# Copyright (C) 2006-2011 Jean-Philippe Lang
|
|
| 3 | 3 |
# |
| 4 | 4 |
# This program is free software; you can redistribute it and/or |
| 5 | 5 |
# modify it under the terms of the GNU General Public License |
| ... | ... | |
| 44 | 44 |
end |
| 45 | 45 |
|
| 46 | 46 |
def attachments_visible?(user=User.current) |
| 47 |
user.allowed_to?(self.class.attachable_options[:view_permission], self.project) |
|
| 47 |
(respond_to?(:visible?) ? visible?(user) : true) && |
|
| 48 |
user.allowed_to?(self.class.attachable_options[:view_permission], self.project) |
|
| 48 | 49 |
end |
| 49 | 50 |
|
| 50 | 51 |
def attachments_deletable?(user=User.current) |
| 51 |
user.allowed_to?(self.class.attachable_options[:delete_permission], self.project) |
|
| 52 |
(respond_to?(:visible?) ? visible?(user) : true) && |
|
| 53 |
user.allowed_to?(self.class.attachable_options[:delete_permission], self.project) |
|
| 52 | 54 |
end |
| 53 | 55 |
|
| 54 | 56 |
def initialize_unsaved_attachments |
| vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb | ||
|---|---|---|
| 1 | 1 |
# Redmine - project management software |
| 2 |
# Copyright (C) 2006-2008 Jean-Philippe Lang
|
|
| 2 |
# Copyright (C) 2006-2011 Jean-Philippe Lang
|
|
| 3 | 3 |
# |
| 4 | 4 |
# This program is free software; you can redistribute it and/or |
| 5 | 5 |
# modify it under the terms of the GNU General Public License |
| ... | ... | |
| 44 | 44 |
end |
| 45 | 45 |
|
| 46 | 46 |
def attachments_visible?(user=User.current) |
| 47 |
user.allowed_to?(self.class.attachable_options[:view_permission], self.project) |
|
| 47 |
(respond_to?(:visible?) ? visible?(user) : true) && |
|
| 48 |
user.allowed_to?(self.class.attachable_options[:view_permission], self.project) |
|
| 48 | 49 |
end |
| 49 | 50 |
|
| 50 | 51 |
def attachments_deletable?(user=User.current) |
| 51 |
user.allowed_to?(self.class.attachable_options[:delete_permission], self.project) |
|
| 52 |
(respond_to?(:visible?) ? visible?(user) : true) && |
|
| 53 |
user.allowed_to?(self.class.attachable_options[:delete_permission], self.project) |
|
| 52 | 54 |
end |
| 53 | 55 |
|
| 54 | 56 |
def initialize_unsaved_attachments |
Also available in: Unified diff