Commit d4619cb6 authored by Jérome Perrin's avatar Jérome Perrin

fix some security definitions and parameter names to zLOG.LOG


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9203 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fc3b1a56
...@@ -1091,7 +1091,8 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -1091,7 +1091,8 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
(table, self.getUid(), table, base_category.getBaseCategoryUid()) (table, self.getUid(), table, base_category.getBaseCategoryUid())
return sql_text return sql_text
security.declareProtected( Permissions.AccessContentsInformation, 'asParentSqlExpression' ) security.declareProtected( Permissions.AccessContentsInformation,
'getParentSqlExpression' )
def getParentSqlExpression(self, table = 'catalog', strict_membership = 0): def getParentSqlExpression(self, table = 'catalog', strict_membership = 0):
""" """
Builds an SQL expression to search children and subclidren Builds an SQL expression to search children and subclidren
...@@ -1832,7 +1833,8 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -1832,7 +1833,8 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
portal_workflow = self.portal_workflow portal_workflow = self.portal_workflow
return portal_workflow.getInfoFor(self, name, wf_id=wf_id) return portal_workflow.getInfoFor(self, name, wf_id=wf_id)
security.declareProtected(Permissions.ManagePortal, 'View') security.declareProtected(Permissions.AccessContentsInformation,
'objectCount')
def objectCount(self): def objectCount(self):
""" """
Returns number of objects Returns number of objects
...@@ -2124,13 +2126,9 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -2124,13 +2126,9 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
def _temp_getTitle(self): def _temp_getTitle(self):
return getattr(self,'title',None) return getattr(self,'title',None)
def log(self, description, content): def log(self, subsystem, message, level=INFO):
""" """Put a log message """
Put a log message LOG(subsystem, level, message)
"""
LOG(description,0,content)
security.declareProtected(Permissions.ModifyPortalContent,'setDescription')
# Dublin Core Emulation for CMF interoperatibility # Dublin Core Emulation for CMF interoperatibility
# CMF Dublin Core Compatibility # CMF Dublin Core Compatibility
......
...@@ -77,7 +77,7 @@ class TranslationProviderBase: ...@@ -77,7 +77,7 @@ class TranslationProviderBase:
if type(ps_property) in (type(()), type([])): if type(ps_property) in (type(()), type([])):
current_list += ps_property current_list += ps_property
# create TranslationInformation object for each property # create TranslationInformation object for each property
for prop in current_list: for prop in current_list:
if prop.get('translatable', 0): if prop.get('translatable', 0):
prop_id = prop['id'] prop_id = prop['id']
if not property_domain_dict.has_key(prop_id): if not property_domain_dict.has_key(prop_id):
...@@ -92,7 +92,7 @@ class TranslationProviderBase: ...@@ -92,7 +92,7 @@ class TranslationProviderBase:
""" """
property_domain_dict = getattr(aq_base(self), '_property_domain_dict', {}) property_domain_dict = getattr(aq_base(self), '_property_domain_dict', {})
if len(property_domain_dict) == 0: if len(property_domain_dict) == 0:
self.createInitialPropertyTranslationDomainDict() self.createInitialPropertyTranslationDomainDict()
return self._property_domain_dict return self._property_domain_dict
# #
...@@ -108,10 +108,10 @@ class TranslationProviderBase: ...@@ -108,10 +108,10 @@ class TranslationProviderBase:
keys.sort() keys.sort()
for k in keys: for k in keys:
prop = prop_domain_name_dict[k] prop = prop_domain_name_dict[k]
t = {} t = {}
t['property_name'] = prop.getPropertyName() t['property_name'] = prop.getPropertyName()
t['domain_name'] = prop.getDomainName() t['domain_name'] = prop.getDomainName()
translation_list.append(t) translation_list.append(t)
# get list of Localizer catalog, add 'empty' one for no traduction # get list of Localizer catalog, add 'empty' one for no traduction
catalog = self.getPortalObject().Localizer.objectIds() + [''] catalog = self.getPortalObject().Localizer.objectIds() + ['']
...@@ -125,7 +125,7 @@ class TranslationProviderBase: ...@@ -125,7 +125,7 @@ class TranslationProviderBase:
) )
security.declareProtected( ManagePortal, 'changeRoles' ) security.declareProtected( ManagePortal, 'changeTranslations' )
def changeTranslations( self, properties=None, REQUEST=None ): def changeTranslations( self, properties=None, REQUEST=None ):
""" """
Update our list of translations domain name Update our list of translations domain name
......
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