NullUnrestrictedUser __str__ broken

Bug #142563 reported by Bug Importer on 2003-05-07
0
Affects Status Importance Assigned to Milestone
Zope 2
Fix Released
Medium
Tres Seaver

Bug Description

AccessControl/User.py, NullUnrestrictedUser - the getUserName method returns a tuple of (None,None). Unfortunately, it derives from BasicUser, which defines __str__ to be getUserName. Thus, when trying to coerce the emergency user when an emergency user doesn't exist, as happens in BasicUserFolder's validate method ("if emergency and user is emergency"), a TypeError is raised, because __str__ doesn't return a string, it returns a tuple.

Either __str__ should be fixed, probably to return str() of getUserName, and/or NullUnrestrictedUser should be set to be false - add a def __len__(self): return 0

Changed in zope2:
status: New → Confirmed
Tres Seaver (tseaver) wrote :
Changed in zope2:
assignee: nobody → Tres Seaver (tseaver)
milestone: none → 2.12.6
status: Confirmed → Fix Committed
Tres Seaver (tseaver) on 2010-05-18
Changed in zope2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers