Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
d6407826
Commit
d6407826
authored
May 06, 1999
by
Amos Latteier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a FTP support bug. Make sure to test if PUT has __roles__ rather than assuming it does.
parent
eff960cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
lib/python/OFS/SimpleItem.py
lib/python/OFS/SimpleItem.py
+5
-4
No files found.
lib/python/OFS/SimpleItem.py
View file @
d6407826
...
...
@@ -89,8 +89,8 @@ Aqueduct database adapters, etc.
This module can also be used as a simple template for implementing new
item types.
$Id: SimpleItem.py,v 1.4
8 1999/05/05 14:58:34 brian
Exp $'''
__version__
=
'$Revision: 1.4
8
$'
[
11
:
-
2
]
$Id: SimpleItem.py,v 1.4
9 1999/05/06 19:30:31 amos
Exp $'''
__version__
=
'$Revision: 1.4
9
$'
[
11
:
-
2
]
import
regex
,
sys
,
Globals
,
App
.
Management
,
Acquisition
from
webdav.Resource
import
Resource
...
...
@@ -279,14 +279,15 @@ class Item(Base, Resource, CopySource, App.Management.Tabs):
from
AccessControl.User
import
nobody
mode
=
0100000
# check read permissions
if
hasattr
(
self
.
aq_base
,
'manage_FTPget'
):
if
hasattr
(
self
.
aq_base
,
'manage_FTPget'
)
and
\
hasattr
(
self
.
manage_FTPget
,
'__roles__'
):
if
REQUEST
[
'AUTHENTICATED_USER'
].
allowed
(
self
.
manage_FTPget
,
self
.
manage_FTPget
.
__roles__
):
mode
=
mode
|
0440
if
nobody
.
allowed
(
self
.
manage_FTPget
,
self
.
manage_FTPget
.
__roles__
):
mode
=
mode
|
0004
# check write permissions
if
hasattr
(
self
.
aq_base
,
'PUT'
):
if
hasattr
(
self
.
aq_base
,
'PUT'
)
and
hasattr
(
self
.
PUT
,
'__roles__'
)
:
if
REQUEST
[
'AUTHENTICATED_USER'
].
allowed
(
self
.
PUT
,
self
.
PUT
.
__roles__
):
mode
=
mode
|
0220
...
...
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