Edgewall Software

Opened 2 years ago

Last modified 2 years ago

#12813 closed enhancement

Get resource from request — at Version 3

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone:
Component: general Version:
Severity: normal Keywords: resource
Cc: Branch:
Release Notes:
API 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. See also th:#11073.

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 (3)

comment:1 by Ryan J Ollos, 2 years ago

Description: modified (diff)

comment:2 by Ryan J Ollos, 2 years ago

Description: modified (diff)
Milestone: next-dev-1.3.xnext-major-releases

comment:3 by Ryan J Ollos, 2 years ago

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