Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Boxiang Sun
erp5
Commits
18801f46
Commit
18801f46
authored
Oct 02, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VCS: Allow developer to store working copies outside of instance home
parent
9861d856
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
product/ERP5VCS/WorkingCopy.py
product/ERP5VCS/WorkingCopy.py
+3
-1
No files found.
product/ERP5VCS/WorkingCopy.py
View file @
18801f46
...
...
@@ -33,6 +33,7 @@ import errno, json, os, re, shutil
from
base64
import
b64encode
,
b64decode
from
tempfile
import
gettempdir
from
AccessControl
import
Unauthorized
from
AccessControl.SecurityManagement
import
getSecurityManager
from
AccessControl.SecurityInfo
import
ModuleSecurityInfo
from
Acquisition
import
aq_base
,
Implicit
from
App.config
import
getConfiguration
...
...
@@ -127,6 +128,7 @@ class WorkingCopy(Implicit):
if
restricted
and
not
any
(
issubdir
(
allowed
,
path
)
or
issubdir
(
allowed
,
real_path
)
for
allowed
in
(
getConfiguration
().
instancehome
,
gettempdir
())):
if
'Developer'
not
in
getSecurityManager
().
getUser
().
getRoles
():
raise
Unauthorized
(
"Unauthorized access to path %r."
" It is NOT in your Zope home instance."
%
path
)
if
os
.
path
.
isdir
(
real_path
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment