[Zope-CMF] Re: Content types per role

Seb Bacon seb at jamkit.com
Fri Dec 19 04:33:32 EST 2003


Yuppie wrote:
> Hi!
> 
> 
> Seb Bacon wrote:
> 
>> Yuppie wrote:
>>
>>> AFAICT the easiest way to implement this is hooking into the existing 
>>> cookie-based machinery for switching skins: The list of selectable 
>>> skins could be controlled by roles and members could get an initial 
>>> portal_skin property based on the assigned roles.
>>
>>
>>
>> This is what I did, but the problem is that you're not authenticated 
>> at traversal hook time, so there's no way of knowing your role.
> 
> 
> Seems you did something different. Why do you need to know the role at 
> traversal hook time? All you need is to evaluate the portal_skin cookie. 
> And that is done by default.

Yes, maybe we're talking about different things. Here's what I mean: to 
know the user's role we need to *some* kind of lookup, and as it's not 
stored in the cookie we have to do it during traversal...?

seb





More information about the Zope-CMF mailing list