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
...@@ -94,6 +94,14 @@ class SubversionTool(UniqueObject, Folder): ...@@ -94,6 +94,14 @@ class SubversionTool(UniqueObject, Folder):
if not path.startswith(self.top_working_path): if not path.startswith(self.top_working_path):
raise Unauthorized, 'unauthorized access to path %s' % path raise Unauthorized, 'unauthorized access to path %s' % path
return 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): def _encodeLogin(self, realm, user, password):
# Encode login information. # Encode login information.
......
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