Commit 7c7294bd authored by Christophe Dumez's avatar Christophe Dumez

- code cleanup


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7235 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7231f23b
......@@ -368,7 +368,6 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
login_cookie_name = 'erp5_subversion_login'
ssl_trust_cookie_name = 'erp5_subversion_ssl_trust'
top_working_path = os.path.join(getConfiguration().instancehome, 'svn')
# Declarative Security
security = ClassSecurityInfo()
......@@ -400,29 +399,7 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
if meta_type['name'] in self.allowed_types:
meta_types.append(meta_type)
return meta_types
def getTopWorkingPath(self):
return self.top_working_path
def _getWorkingPath(self, path):
path = os.path.abspath(path)
if not path.startswith(self.top_working_path):
raise Unauthorized, 'unauthorized access to path %s' % path
return path
def setWorkingDirectory(self, path):
self.workingDirectory = path
os.chdir(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
# path is the path in svn working copy
# return edit_path in zodb to edit it
# return '#' if no zodb path is found
......
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