Edgewall Software

Changes between Initial Version and Version 1 of Ticket #13282, comment 6


Ignore:
Timestamp:
May 7, 2020, 12:43:20 AM (19 months ago)
Author:
Ryan J Ollos

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13282, comment 6

    initial v1  
    1313Summarizing findings:
    1414* Numerous changes are needed to Trac so that ticket comment visibility can be restricted based on resource `id` and `version`.
    15 * Ticket `changetime`/`cnum` are not known until `ticket.save_changes` is called (the `cnum` is contains the resource `version`). `ITicketManipulator` methods are only called before changes are saved (thus my proposal to add a method that is called after saving changes). `RequestFilter.post_process_request` isn't called for the `POST` request because there is a redirect. It's possible that a redirect listener could be used here, I haven't revisited that solution, but it would probably be complex.
     15* Ticket `changetime`/`cnum` are not known until `ticket.save_changes` is called (the `cnum` contains the resource `version`). `ITicketManipulator` methods are only called before changes are saved (thus my proposal to add a method that is called after saving changes). `RequestFilter.post_process_request` isn't called for the `POST` request because there is a redirect. It's possible that a redirect listener could be used here, I haven't revisited that solution, but it would probably be complex.
    1616* `ITicketChangeListener` might otherwise be used to save the ticket `id` and `version` in a `private_comments` table, but there are two problems:
    1717 * It doesn't have access to the `req` object. This can be overcome by taking the value from the request in `ITicketManipulator.validate_ticket` or `IRequestFilter.pre_process_request` and adding it to the `Ticket` object.