Edgewall Software

Opened 4 years ago

Last modified 4 years ago

#12813 closed enhancement

Get resource from request — at Version 1

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone:
Component: general Version:
Severity: normal Keywords: resource
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

VotePlugin needs to get the resource for a request. It currently does this in a way that isn't entirely robust, see resource_from_path.

The reason the method isn't robust is that it assume the path / corresponds to wiki/WikiStart, but this depends on [trac] default_handler and the session preference for default handler.

I seem to remember the issue coming up for other plugins as well.

Initially I considered adding a function resource_from_request. However, maybe it would make the most sense to setup a callback and make the resource available as req.resource?

Change History (1)

comment:1 by Ryan J Ollos, 4 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.