diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-02-17 14:17:20 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-02-17 14:17:20 +0000 |
commit | e5daf25618e017e50293a77ea33ddc51cf1603b3 (patch) | |
tree | ce8179ab433b135cf2051b54abb1123a7264b7ea /app/models | |
parent | 5d6d0136c1322a209bb17077fa908659a756a998 (diff) | |
download | redmine-e5daf25618e017e50293a77ea33ddc51cf1603b3.tar.gz redmine-e5daf25618e017e50293a77ea33ddc51cf1603b3.zip |
Fixes:
* email notifications: host name is missing in generated links (#639, #201)
* email notifications: referenced changesets, wiki pages, attachments... are not turned into links (only ticket ids are)
* attachment links and inline images don't work in issue notes
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1161 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/journal.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/models/journal.rb b/app/models/journal.rb index 5aebbb7ce..d757ef90d 100644 --- a/app/models/journal.rb +++ b/app/models/journal.rb @@ -51,7 +51,14 @@ class Journal < ActiveRecord::Base end def editable_by?(usr) - project = journalized.project usr && usr.logged? && (usr.allowed_to?(:edit_issue_notes, project) || (self.user == usr && usr.allowed_to?(:edit_own_issue_notes, project))) end + + def project + journalized.respond_to?(:project) ? journalized.project : nil + end + + def attachments + journalized.respond_to?(:attachments) ? journalized.attachments : nil + end end |