Commit 2e5a9f72 authored by 's avatar

Fixed up unprotected methods

parent 4e6a689d
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""DTML Method objects.""" """DTML Method objects."""
__version__='$Revision: 1.46 $'[11:-2] __version__='$Revision: 1.47 $'[11:-2]
import History import History
from Globals import HTML, HTMLFile, MessageDialog from Globals import HTML, HTMLFile, MessageDialog
...@@ -141,7 +141,7 @@ class DTMLMethod(cDocument, HTML, Acquisition.Implicit, RoleManager, ...@@ -141,7 +141,7 @@ class DTMLMethod(cDocument, HTML, Acquisition.Implicit, RoleManager,
'document_src', 'PrincipiaSearchSource')), 'document_src', 'PrincipiaSearchSource')),
('Change DTML Methods', ('manage_edit', 'manage_upload', 'PUT')), ('Change DTML Methods', ('manage_edit', 'manage_upload', 'PUT')),
('Change proxy roles', ('manage_proxyForm', 'manage_proxy')), ('Change proxy roles', ('manage_proxyForm', 'manage_proxy')),
('View', ('__call__', '')), ('View', ('__call__', 'get_size', '')),
('FTP access', ('manage_FTPstat','manage_FTPget','manage_FTPlist')), ('FTP access', ('manage_FTPstat','manage_FTPget','manage_FTPlist')),
) )
...@@ -182,7 +182,6 @@ class DTMLMethod(cDocument, HTML, Acquisition.Implicit, RoleManager, ...@@ -182,7 +182,6 @@ class DTMLMethod(cDocument, HTML, Acquisition.Implicit, RoleManager,
def get_size(self): def get_size(self):
return len(self.raw) return len(self.raw)
getSize=get_size
def validate(self, inst, parent, name, value, md): def validate(self, inst, parent, name, value, md):
return getSecurityManager().validate(inst, parent, name, value) return getSecurityManager().validate(inst, parent, name, value)
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""Image object""" """Image object"""
__version__='$Revision: 1.104 $'[11:-2] __version__='$Revision: 1.105 $'[11:-2]
import Globals, string, struct, content_types import Globals, string, struct, content_types
from OFS.content_types import guess_content_type from OFS.content_types import guess_content_type
...@@ -162,7 +162,7 @@ class File(Persistent,Implicit,PropertyManager, ...@@ -162,7 +162,7 @@ class File(Persistent,Implicit,PropertyManager,
('Change Images and Files', ('Change Images and Files',
('manage_edit','manage_upload','PUT')), ('manage_edit','manage_upload','PUT')),
('View', ('View',
('index_html', 'view_image_or_file', 'getSize', ('index_html', 'view_image_or_file', 'get_size',
'getContentType', '')), 'getContentType', '')),
('FTP access', ('FTP access',
('manage_FTPstat','manage_FTPget','manage_FTPlist')), ('manage_FTPstat','manage_FTPget','manage_FTPlist')),
...@@ -362,7 +362,7 @@ class File(Persistent,Implicit,PropertyManager, ...@@ -362,7 +362,7 @@ class File(Persistent,Implicit,PropertyManager,
RESPONSE.setStatus(204) RESPONSE.setStatus(204)
return RESPONSE return RESPONSE
def getSize(self): def get_size(self):
"""Get the size of a file or image. """Get the size of a file or image.
Returns the size of the file or image. Returns the size of the file or image.
...@@ -371,7 +371,6 @@ class File(Persistent,Implicit,PropertyManager, ...@@ -371,7 +371,6 @@ class File(Persistent,Implicit,PropertyManager,
if size is None: size=len(self.data) if size is None: size=len(self.data)
return size return size
get_size=getSize
def getContentType(self): def getContentType(self):
"""Get the content type of a file or image. """Get the content type of a file or image.
...@@ -380,7 +379,6 @@ class File(Persistent,Implicit,PropertyManager, ...@@ -380,7 +379,6 @@ class File(Persistent,Implicit,PropertyManager,
""" """
return self.content_type return self.content_type
size=getSize
def __str__(self): return str(self.data) def __str__(self): return str(self.data)
def __len__(self): return 1 def __len__(self): return 1
...@@ -436,7 +434,7 @@ class Image(File): ...@@ -436,7 +434,7 @@ class Image(File):
('Change Images and Files', ('Change Images and Files',
('manage_edit','manage_upload','PUT')), ('manage_edit','manage_upload','PUT')),
('View', ('View',
('index_html', 'tag', 'view_image_or_file', 'getSize', ('index_html', 'tag', 'view_image_or_file', 'get_size',
'getContentType', '')), 'getContentType', '')),
('FTP access', ('FTP access',
('manage_FTPstat','manage_FTPget','manage_FTPlist')), ('manage_FTPstat','manage_FTPget','manage_FTPlist')),
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""Property management""" """Property management"""
__version__='$Revision: 1.25 $'[11:-2] __version__='$Revision: 1.26 $'[11:-2]
import ExtensionClass, Globals import ExtensionClass, Globals
import ZDOM import ZDOM
...@@ -185,7 +185,8 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes): ...@@ -185,7 +185,8 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes):
'manage_changePropertyTypes', 'manage_changePropertyTypes',
)), )),
('Access contents information', ('Access contents information',
('hasProperty', 'propertyIds', 'propertyValues','propertyItems',''), ('hasProperty', 'propertyIds', 'propertyValues','propertyItems',
'getProperty', 'getPropertyType', 'propertyMap', ''),
('Anonymous', 'Manager'), ('Anonymous', 'Manager'),
), ),
) )
......
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