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