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
0e1306fd
Commit
0e1306fd
authored
Apr 03, 2001
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed some assumptions about aquisition
parent
6f8b7090
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
lib/python/OFS/SimpleItem.py
lib/python/OFS/SimpleItem.py
+15
-9
No files found.
lib/python/OFS/SimpleItem.py
View file @
0e1306fd
...
...
@@ -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.8
6 2001/02/05 21:48:31 chrism
Exp $'''
__version__
=
'$Revision: 1.8
6
$'
[
11
:
-
2
]
$Id: SimpleItem.py,v 1.8
7 2001/04/03 15:13:42 brian
Exp $'''
__version__
=
'$Revision: 1.8
7
$'
[
11
:
-
2
]
import
ts_regex
,
sys
,
Globals
,
App
.
Management
,
Acquisition
,
App
.
Undo
import
AccessControl.Role
,
AccessControl
.
Owned
,
App
.
Common
...
...
@@ -103,6 +103,8 @@ from types import InstanceType, StringType
from
ComputedAttribute
import
ComputedAttribute
from
AccessControl
import
getSecurityManager
from
Traversable
import
Traversable
from
Acquisition
import
aq_base
import
time
import
marshal
import
ZDOM
...
...
@@ -286,7 +288,7 @@ class Item(Base, Resource, CopySource, App.Management.Tabs, Traversable,
mode
=
0100000
# check read permissions
if
(
hasattr
(
self
.
aq_base
,
'manage_FTPget'
)
and
if
(
hasattr
(
aq_base
(
self
)
,
'manage_FTPget'
)
and
hasattr
(
self
.
manage_FTPget
,
'__roles__'
)):
try
:
if
getSecurityManager
().
validateValue
(
self
.
manage_FTPget
):
...
...
@@ -297,7 +299,7 @@ class Item(Base, Resource, CopySource, App.Management.Tabs, Traversable,
mode
=
mode
|
0004
# check write permissions
if
hasattr
(
self
.
aq_base
,
'PUT'
)
and
hasattr
(
self
.
PUT
,
'__roles__'
):
if
hasattr
(
aq_base
(
self
)
,
'PUT'
)
and
hasattr
(
self
.
PUT
,
'__roles__'
):
try
:
if
getSecurityManager
().
validateValue
(
self
.
PUT
):
mode
=
mode
|
0220
...
...
@@ -314,13 +316,17 @@ class Item(Base, Resource, CopySource, App.Management.Tabs, Traversable,
else
:
size
=
0
# get modification time
mtime
=
self
.
bobobase_modification_time
().
timeTime
()
if
hasattr
(
aq_base
(
self
),
'bobobase_modification_time'
):
mtime
=
self
.
bobobase_modification_time
().
timeTime
()
else
:
mtime
=
time
.
time
()
# get owner and group
owner
=
group
=
'Zope'
for
user
,
roles
in
self
.
get_local_roles
():
if
'Owner'
in
roles
:
owner
=
user
break
if
hasattr
(
aq_base
(
self
),
'get_local_roles'
):
for
user
,
roles
in
self
.
get_local_roles
():
if
'Owner'
in
roles
:
owner
=
user
break
return
marshal
.
dumps
((
mode
,
0
,
0
,
1
,
owner
,
group
,
size
,
mtime
,
mtime
,
mtime
))
def
manage_FTPlist
(
self
,
REQUEST
):
...
...
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