Commit 7c5c1a1a authored by 's avatar

Merged access fix for propertysheets object methods from 2.2 branch

parent c1d23a7e
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""Property sheets""" """Property sheets"""
__version__='$Revision: 1.51 $'[11:-2] __version__='$Revision: 1.52 $'[11:-2]
import time, string, App.Management, Globals import time, string, App.Management, Globals
from ZPublisher.Converters import type_converters from ZPublisher.Converters import type_converters
...@@ -574,6 +574,20 @@ class PropertySheets(Traversable, Implicit, App.Management.Tabs): ...@@ -574,6 +574,20 @@ class PropertySheets(Traversable, Implicit, App.Management.Tabs):
id='propertysheets' id='propertysheets'
__ac_permissions__=(
('Manage properties', ('manage_addPropertySheet',
'addPropertySheet',
'delPropertySheet'
)),
('Access contents information',
('items', 'values', 'get', ''),
('Anonymous', 'Manager'),
),
('View management screens', ('manage',)),
)
webdav =DAVProperties() webdav =DAVProperties()
def _get_defaults(self): def _get_defaults(self):
return (self.webdav,) return (self.webdav,)
...@@ -607,6 +621,7 @@ class PropertySheets(Traversable, Implicit, App.Management.Tabs): ...@@ -607,6 +621,7 @@ class PropertySheets(Traversable, Implicit, App.Management.Tabs):
return r return r
def get(self, name, default=None): def get(self, name, default=None):
# pdb.set_trace()
for propset in self.__propsets__(): for propset in self.__propsets__():
if propset.id==name or propset.xml_namespace()==name: if propset.id==name or propset.xml_namespace()==name:
return propset.__of__(self) return propset.__of__(self)
...@@ -669,6 +684,8 @@ class PropertySheets(Traversable, Implicit, App.Management.Tabs): ...@@ -669,6 +684,8 @@ class PropertySheets(Traversable, Implicit, App.Management.Tabs):
return PropertySheets.inheritedAttribute('tabs_path_info')( return PropertySheets.inheritedAttribute('tabs_path_info')(
self, script, path) self, script, path)
Globals.default__class_init__(PropertySheets)
class DefaultPropertySheets(PropertySheets): class DefaultPropertySheets(PropertySheets):
"""A PropertySheets container that contains a default property """A PropertySheets container that contains a default property
...@@ -679,6 +696,8 @@ class DefaultPropertySheets(PropertySheets): ...@@ -679,6 +696,8 @@ class DefaultPropertySheets(PropertySheets):
def _get_defaults(self): def _get_defaults(self):
return (self.default, self.webdav) return (self.default, self.webdav)
Globals.default__class_init__(DefaultPropertySheets)
class FixedSchema(PropertySheet): class FixedSchema(PropertySheet):
......
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