Patch #8768 » Редактирование_комментариев_не_позже_4_часов.patch
| journals_helper.rb (working copy) | ||
|---|---|---|
| 18 | 18 |
module JournalsHelper |
| 19 | 19 |
def render_notes(issue, journal, options={})
|
| 20 | 20 |
content = '' |
| 21 |
editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project))) |
|
| 21 |
# editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project))) |
|
| 22 |
#user can change his comment only if it was created in 4 hours before now (if user have only :edit_own_issue_notes) |
|
| 23 |
editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project) && ((Time.now - journal.created_on) < 14400))) |
|
| 22 | 24 |
links = [] |
| 23 | 25 |
if !journal.notes.blank? |
| 24 | 26 |
links << link_to_remote(image_tag('comment.png'),
|