Opened 7 years ago
Last modified 6 years ago
#12813 closed enhancement
Get resource from request — at Initial Version
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
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. I seem to remember the issue coming up for other plugins as well.
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.
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
?