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 ).

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. ;)


Sorry for my english.

san at ung.ru
Zope-PAS mailing list

Reply via email to