Edgewall Software

Opened 4 years ago

Last modified 4 years ago

#12813 closed enhancement

Get resource from request — at Version 2

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.

I've considered adding a function resource_from_request. The resource realm, id, parent realm/id and version can be parsed from the URL. However, I'm unsure how to get the resource for a request to /. Any ideas?

Change History (2)

comment:1 by Ryan J Ollos, 4 years ago

Description: modified (diff)

comment:2 by Ryan J Ollos, 4 years ago

Description: modified (diff)
Milestone: next-dev-1.3.xnext-major-releases
Note: See TracTickets for help on using tickets.