Commit e40756db authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

ERP5Security: support ERP5User without Person that is (for now) used in unit tests.

parent e641651b
...@@ -214,13 +214,13 @@ class ERP5User(PropertiedUser): ...@@ -214,13 +214,13 @@ class ERP5User(PropertiedUser):
result = self._user_value result = self._user_value
if result is not None: if result is not None:
return result return result
user, = [x for x in self.aq_parent.searchUsers( user_list = [x for x in self.aq_parent.searchUsers(
exact_match=True, exact_match=True,
id=self.getId(), id=self.getId(),
) if 'path' in x] ) if 'path' in x]
if len(user_list) == 1:
result = self._user_value = self.getPortalObject().restrictedTraverse( result = self._user_value = self.getPortalObject().restrictedTraverse(
user['path'], user_list[0]['path'])
)
return result return result
def getLoginValue(self): def getLoginValue(self):
......
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