On Apr 27, 2010, at 2:27 PM, Dalton Barreto wrote:

> 2010/4/27 Carsten Klein <carsten.kl...@axn-software.de>:
>> 
>> In my request filter (for a redirection management kind of plugin), I have
>> the problem that sometimes, on access to for example
>> 
>> http://trac-example.org/
>> 
>> I do not know which realm the request is to be associated with. Therefore,
>> I am unable to find existing redirections defined for example for
>> '/wiki/'.
>> 
>> Primary use case for the wiki is here, that I want to be able to
>> automatically redirect from /[wiki/WikiStart] to a different page.
>> 
> 
> How will you decide where to redirect the request? Based on what?
> 
> Tell me more about this "redirection management kind of plugin". I
> wrote a small plugin that does
> redirection based on user's group, for example:
> 
> If the user "a" is part of the "customerA" group he will be redirected
> to "/wiki/colaborators/customerA" after login.
> 
> I wrote this plugin because here we gave access to our customers, so
> every employee from the same company gets redirected to a specific
> page
> for that company and the WikiStart is only for the developers.
> 
> What are the rules for your redirections?
> 
> 
> Is this anyway related to what are you trying to do?
> 

Remember that not every handler is going to just map to a URL. For example, 
HTTPAuthPlugin actually doesn't match any URL since it is injected in a 
pre-process-request. We discussed adding a regex system to accelerate dispatch, 
but it wouldn't cover all use cases so it would only be used if it _did_ match 
(I think it was called "controller", look in the attic). If you want to run 
your own match, you can just do that. Iterate over all the request handlers and 
call match_request with a fake req object of some kind.

--Noah

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to trac-...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en.

Reply via email to