Commit 5d801408 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Vincent Pelletier

ERP5Type: add AccessControl.users.BasicUser.getIdOrUserName().

In ERP5User, getId() is the identifier, but for SpeicalUser, like
Anonymous User, System Processes etc., getId() is None.
parent 0b2c77f0
...@@ -87,6 +87,7 @@ from Products.ERP5Type.patches import CMFCoreUtils ...@@ -87,6 +87,7 @@ from Products.ERP5Type.patches import CMFCoreUtils
from Products.ERP5Type.patches import ZopePageTemplate from Products.ERP5Type.patches import ZopePageTemplate
from Products.ERP5Type.patches import ZSQLMethod from Products.ERP5Type.patches import ZSQLMethod
from Products.ERP5Type.patches import MimetypesRegistry from Products.ERP5Type.patches import MimetypesRegistry
from Products.ERP5Type.patches import users
# These symbols are required for backward compatibility # These symbols are required for backward compatibility
from Products.ERP5Type.patches.PropertyManager import ERP5PropertyManager from Products.ERP5Type.patches.PropertyManager import ERP5PropertyManager
......
from AccessControl.users import BasicUser
if True:
def getIdOrUserName(self):
return self.getId() or self.getUserName()
BasicUser.getIdOrUserName = getIdOrUserName
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