Commit bb926122 authored by 's avatar

Fixed a bug in Image.py - the Image and File classes attempted to share

their __ac_permissions__ definition, but this caused the View permission
for File objects to be unsettable since the 'tag' method (which actually
only exists on Images) was in the 'View' permission definition. To fix
this, I gave Image its own __ac_permissions__ structure and got rid of
the reference to 'tag' in the __ac_permissions__ of File.
parent 4f1ef6e0
......@@ -84,7 +84,7 @@
##############################################################################
"""Image object"""
__version__='$Revision: 1.93 $'[11:-2]
__version__='$Revision: 1.94 $'[11:-2]
import Globals, string, struct, content_types
from OFS.content_types import guess_content_type
......@@ -152,7 +152,7 @@ class File(Persistent,Implicit,PropertyManager,
('Change Images and Files',
('manage_edit','manage_upload','PUT')),
('View',
('index_html', 'tag', 'view_image_or_file', 'getSize',
('index_html', 'view_image_or_file', 'getSize',
'getContentType', '')),
('FTP access',
('manage_FTPstat','manage_FTPget','manage_FTPlist')),
......@@ -405,6 +405,20 @@ class Image(File):
height=''
width=''
__ac_permissions__=(
('View management screens',
('manage', 'manage_main', 'manage_uploadForm',)),
('Change Images and Files',
('manage_edit','manage_upload','PUT')),
('View',
('index_html', 'tag', 'view_image_or_file', 'getSize',
'getContentType', '')),
('FTP access',
('manage_FTPstat','manage_FTPget','manage_FTPlist')),
('Delete objects',
('DELETE',)),
)
_properties=({'id':'title', 'type': 'string'},
{'id':'content_type', 'type':'string'},
{'id':'height', 'type':'string'},
......
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