Christopher Lenz wrote:
>    "As fine-grained security and permission checks are becoming the  
> rule in Trac, one shouldn't be able to access a resource without the  
> appropriate credentials."
> 
> I *strongly* disagree with this. That *may* be something to think  
> about for a future release, but most definitely not for 0.11.

I agree that it should not be targeted for 0.11

> My idea (and I think I'm not alone here) was that we should go back  
> and fix Context by removing/simplifying. What you're proposing here  
> seems to go in a totally different direction.

That's how I feel too.

<snip mucho re: rendering contexts>

> What I meant was that I've seen examples of stuff that wouldn't ever  
> be an actual resource identifier. I may have gotten the wrong  
> impression here, or may be misremembering the examples

It would be interesting to know what examples these might be.  It would 
seem to me that most all links that are rendered would have *some* 
resource identifier behind them.

> Anyway, I strongly doubt we'll need to identify the "resource/ 
> context" in which some other resource is being rendered. The only use  
> case I can think of are relative links (as in ../foo instead of /bar/ 
> foo), and those are more trouble than they're worth. That's not to  
> say that the idea of a "rendering context" isn't needed, just that  
> that context doesn't need to know about the (pseudo-)resource in  
> which it's being used.

I think I agree here.  If I'm trying to render a resource, I'm going to 
pass it off to the `get_url()` method (or whatever it's called) and that 
will return a valid URL for the resource identifier I specified.

This brings me to the `IResourceManager` interface.

First, from reading the TracDev/ContextRefactoring page, it seems that 
in cmlenz's proposal, I would pass a resource identifier to 
`self.env.get_resource_manager()` and I would get back an the 
appropriate object that implements `IResourceManager`.  In cboos's 
proposal, the `IResourceManager` interface is tied to the resource 
itself, no?

Anyway, I mostly like the way cmlenz's proposal works.  However, instead 
of returning a resource manager object, I would like to simply call the 
corresponding function.  Ie:

self.env.resource.get_url(resource_identifier)

I don't really want to have to deal with passing around resource manager 
objects.  Any reason why there shouldn't be just one manager object 
attached to the environment?

Also, it seems to me that URLs returned from the `IResourceManger` 
interface should exclude the scheme/hostname parts.  Please correct me 
if my thinking is wrong.  It seems that if the URL returned by the 
`IResourceManger` is just the path part, then it would make things easier.

-John

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

Reply via email to