Commit 5f55818d authored by Yoshinori Okuji's avatar Yoshinori Okuji

Add getDefaultUserName.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4796 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 69aa3eb2
......@@ -95,6 +95,14 @@ class SubversionTool(UniqueObject, Folder):
raise Unauthorized, 'unauthorized access to path %s' % path
return path
def getDefaultUserName(self):
"""Return a default user name.
"""
name = self.portal_preferences.getPreferredSubversionUserName()
if not name:
name = self.portal_membership.getAuthenticatedMember().getUserName()
return name
def _encodeLogin(self, realm, user, password):
# Encode login information.
return b64encode(dumps((realm, user, password)))
......
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