[Zope-CMF] Re: Content types per role

Seb Bacon seb at jamkit.com
Thu Dec 18 12:55:55 EST 2003


Yuppie wrote:
>> Speaking of wishes, another one that I talked to Seb Bacon and Kapil 
>> about  is skin-binding to particular roles, I believe he made a quick 
>> and dirty  prototype, but it never progressed beyond that because of 
>> where the skin  bindings happen in the traversal part, IIRC. They can 
>> probably explain it  better.

> 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. Kapil 
suggested just doing a "manual" authentication to work this out using 
cookied credentials which seems like a good enough idea, though I don't 
know what effect it'll have on performance (effectively authenticating 
twice on each request).  This was enough of a bummer for me not to 
bother (the rest was a no-brainer), but I might well revisit it in the 
new year if the prodding starts again.

/me ignores limi's coughing fit

seb





More information about the Zope-CMF mailing list