Patch #8768 » Редактирование_комментариев_не_позже_4_часов_controller.patch
| journal.rb (working copy) | ||
|---|---|---|
|
end
|
||
|
|
||
|
def editable_by?(usr)
|
||
|
usr && usr.logged? && (usr.allowed_to?(:edit_issue_notes, project) || (self.user == usr && usr.allowed_to?(:edit_own_issue_notes, project)))
|
||
|
# usr && usr.logged? && (usr.allowed_to?(:edit_issue_notes, project) || (self.user == usr && usr.allowed_to?(:edit_own_issue_notes, project)))
|
||
|
##user can change his comment only if it was created in 4 hours before now (if user have only :edit_own_issue_notes)
|
||
|
usr && usr.logged? && (usr.allowed_to?(:edit_issue_notes, project) || (self.user == usr && usr.allowed_to?(:edit_own_issue_notes, project) && ((Time.now - self.created_on) < 14400)))
|
||
|
end
|
||
|
|
||
|
def project
|
||
- « Previous
- 1
- 2
- Next »