[Zope] prevent user aquisition with custom userfolder

zope-mailinglist zope-mailinglist@mopa.at
Fri, 30 Aug 2002 07:50:53 +0200


Chris Withers wrote:
> zope-mailinglist wrote:
> 
>> has anybody got an idea where i can subclass something and override 
>> the dependent methods?
> 
> 
> It's pretty deeply ingrained and I think you'll have a hard time 
> customising it to meet your needs.
> 
> cheers,
> 
> Chris

for the posterity ...

finally i found a solution

its sufficient to return a user with only the anonymous role like this:


from AccessControl.User import SpecialUser

...

     def getUser(self,id):
         user = self._ps.get(id)
         if not user:
             user = SpecialUser(id,'',('Anonymous',), [])
         return user


cheers, bernd