[Zope-PAS] traverse in CookieAuthHelper & PAS export/import

san san at ung.ru
Tue Jun 13 05:44:38 EDT 2006


Hi all.

Where is small omission in CookieAuthHelper. I'm using it for challenge. 
Problem: traverse subpath is lost during redirect to the login form. To 
resolve this problem you can add traverse subpath to the "came_from" 
value in function unauthorized() ( CookieAuthHelper.py ).

instead:
...
url = url + '?came_from=%s' % quote(came_from)
resp.redirect(url, lock=1)
return 1

may be so?
...
url = url + '?came_from=%s' % quote(came_from)
traverse = req.get('traverse_subpath', None)
if traverse and len(traverse) > 0:
   for subpath in traverse:
       url += "/%s" % subpath
resp.redirect(url, lock=1)
return 1

Second thing is error "Duplicate role Manager" (if you are manager) 
apear when you importing PAS object with ZODBRoleManager. After you add 
ZODBUserManager to your PASUserFolder where is already this role, which 
cause error on import. Also this role apears when you make changes in 
your PASUserFolder. To avoid this I just delete it before export. Other 
roles ( not manager and owner) that you add to ZODBUserManager don't 
cause this error. I know that it is abnormal, but show me the right way. ;)

Using:
zope-2.9.2
PAS-1.2

Sorry for my english.

san at ung.ru


More information about the Zope-PAS mailing list