Commit 65c2aae2 authored by Christophe Dumez's avatar Christophe Dumez

- fixed error message when path not in zope home instance.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7447 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1ff25f07
...@@ -137,6 +137,11 @@ class SubversionNotAWorkingCopyError(Exception): ...@@ -137,6 +137,11 @@ class SubversionNotAWorkingCopyError(Exception):
""" """
pass pass
class UnauthorizedAccessToPath(Exception):
""" When path is not in zope home instance
"""
pass
def colorizeTag(tag): def colorizeTag(tag):
"Return html colored item" "Return html colored item"
...@@ -715,7 +720,7 @@ class SubversionTool(BaseTool, UniqueObject, Folder): ...@@ -715,7 +720,7 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
""" Check if the given path is reachable (allowed) """ Check if the given path is reachable (allowed)
""" """
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 UnauthorizedAccessToPath, 'Unauthorized access to path %s. It is NOT in your Zope home instance.' % path
return path return path
security.declareProtected('Import/Export objects', 'update') security.declareProtected('Import/Export objects', 'update')
......
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