Commit d2487d10 authored by 's avatar

Security changes

parent dd4f5983
"""Document object"""
__version__='$Revision: 1.38 $'[11:-2]
__version__='$Revision: 1.39 $'[11:-2]
from Globals import HTML, HTMLFile, MessageDialog
from string import join,split,strip,rfind,atoi
......@@ -40,7 +40,8 @@ class Document(HTML, Explicit, RoleManager, Item_w__name__):
('View management screens', ['manage','manage_tabs','manage_uploadForm']),
('Change permissions', ['manage_access']),
('Change/upload data', ['manage_edit','manage_upload','PUT']),
('View', ['',]),
('View', ['__call__',]),
('Shared permission', ['',]),
)
__ac_types__=(('Full Access', map(lambda x: x[0], __ac_permissions__)),
......
"""Folder object
$Id: Folder.py,v 1.31 1998/01/02 17:22:56 brian Exp $"""
$Id: Folder.py,v 1.32 1998/01/09 20:23:19 brian Exp $"""
__version__='$Revision: 1.31 $'[11:-2]
__version__='$Revision: 1.32 $'[11:-2]
from Globals import HTMLFile
......@@ -103,7 +103,7 @@ class Folder(ObjectManager,RoleManager,DocumentHandler,
('Add properties', ['manage_addProperty']),
('Change properties', ['manage_editProperties']),
('Delete properties', ['manage_delProperties']),
('Default permission', ['']),
('Shared permission', ['']),
)
__ac_types__=(('Full Access', map(lambda x: x[0], __ac_permissions__)),
......
"""Image object"""
__version__='$Revision: 1.22 $'[11:-2]
__version__='$Revision: 1.23 $'[11:-2]
from Globals import HTMLFile, MessageDialog
from AccessControl.Role import RoleManager
......@@ -37,6 +37,7 @@ class File(Persistent,Implicit,RoleManager,Item_w__name__):
('Change permissions', ['manage_access']),
('Change/upload data', ['manage_edit','manage_upload','PUT']),
('View', ['index_html',]),
('Shared permission', ['',]),
)
__ac_types__=(('Full Access', map(lambda x: x[0], __ac_permissions__)),
......@@ -85,6 +86,7 @@ class File(Persistent,Implicit,RoleManager,Item_w__name__):
message='Your changes have been saved',
action ='manage_main')
PUT__roles__=['Manager']
def PUT(self, BODY, REQUEST):
'handle PUT requests'
self.data=BODY
......@@ -107,6 +109,8 @@ class Image(File):
manage_uploadForm=HTMLFile('imageUpload',globals(),Kind='Image',kind='image')
manage=manage_main=manage_editForm
PUT__roles__=['Manager']
def __str__(self):
return '<IMG SRC="%s" ALT="%s">' % (self.__name__, self.title_or_id())
......
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