Commit 3e05638a authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Jérome Perrin

zope4: use getId() instead of __str__() for getAuthenticatedMember() value.

because __str__() returns id in Zope2 but returns login in Zope4.
parent 3145b32f
......@@ -6,7 +6,7 @@ howto_dict = context.Zuite_getHowToInfo()
isTransitionPossible = portal.portal_workflow.isTransitionPossible
# in testExpressUserDocumentationIncomingEvent we relly that loged in user is an ERP5 Person
logged_in_user = str(context.portal_membership.getAuthenticatedMember())
logged_in_user = context.portal_membership.getAuthenticatedMember().getId()
current_person = context.portal_catalog.getResultValue(portal_type='Person',
reference=logged_in_user)
if current_person is None:
......
......@@ -9,7 +9,7 @@ if context.getPriority() != 3: # XXX 3 is Priority.USER
return
for preference in portal.portal_preferences.searchFolder(
viewable_owner={'query': str(portal.portal_membership.getAuthenticatedMember()), 'key': 'ExactMatch'},
viewable_owner={'query': portal.portal_membership.getAuthenticatedMember().getId(), 'key': 'ExactMatch'},
portal_type=context.getPortalType()):
preference = preference.getObject()
assert portal.portal_membership.getAuthenticatedMember().allowed(preference, ['Owner', ]), preference
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment