Declare mixin methods (ClassMixin, ToolMixin...) as 'public' in the Zope sense to avoid security problems and corrected a small bug in the new POD statement for defining variables (regular expression forced the user to put spaces in the variable declaration before and after the '=' sign).
This commit is contained in:
parent
a5707f1fa6
commit
b4d2360d6f
|
@ -29,6 +29,8 @@ class <!genClassName!>(<!parents!>):
|
||||||
i18nDomain = '<!applicationName!>'
|
i18nDomain = '<!applicationName!>'
|
||||||
schema = fullSchema
|
schema = fullSchema
|
||||||
wrapperClass = <!genClassName!>_Wrapper
|
wrapperClass = <!genClassName!>_Wrapper
|
||||||
|
for elem in dir(ClassMixin):
|
||||||
|
if not elem.startswith('__'): security.declarePublic(elem)
|
||||||
<!commonMethods!>
|
<!commonMethods!>
|
||||||
<!methods!>
|
<!methods!>
|
||||||
<!register!>
|
<!register!>
|
||||||
|
|
|
@ -32,6 +32,8 @@ class <!flavourName!>(OrderedBaseFolder, FlavourMixin):
|
||||||
allMetaTypes = <!metaTypes!>
|
allMetaTypes = <!metaTypes!>
|
||||||
wrapperClass = <!wrapperClass!>
|
wrapperClass = <!wrapperClass!>
|
||||||
_at_rename_after_creation = True
|
_at_rename_after_creation = True
|
||||||
|
for elem in dir(FlavourMixin):
|
||||||
|
if not elem.startswith('__'): security.declarePublic(elem)
|
||||||
<!commonMethods!>
|
<!commonMethods!>
|
||||||
<!predefinedMethods!>
|
<!predefinedMethods!>
|
||||||
<!methods!>
|
<!methods!>
|
||||||
|
|
|
@ -29,6 +29,8 @@ class <!applicationName!>PodTemplate(BaseContent, PodTemplateMixin):
|
||||||
_at_rename_after_creation = True
|
_at_rename_after_creation = True
|
||||||
wrapperClass = <!wrapperClass!>
|
wrapperClass = <!wrapperClass!>
|
||||||
schema = fullSchema
|
schema = fullSchema
|
||||||
|
for elem in dir(PodTemplateMixin):
|
||||||
|
if not elem.startswith('__'): security.declarePublic(elem)
|
||||||
<!commonMethods!>
|
<!commonMethods!>
|
||||||
<!methods!>
|
<!methods!>
|
||||||
registerType(<!applicationName!>PodTemplate, '<!applicationName!>')
|
registerType(<!applicationName!>PodTemplate, '<!applicationName!>')
|
||||||
|
|
|
@ -38,6 +38,8 @@ class <!toolName!>(UniqueObject, OrderedBaseFolder, ToolMixin):
|
||||||
# When browsing into the tool, the 'configure' portlet should be dislayed.
|
# When browsing into the tool, the 'configure' portlet should be dislayed.
|
||||||
left_slots = ['here/portlet_prefs/macros/portlet']
|
left_slots = ['here/portlet_prefs/macros/portlet']
|
||||||
right_slots = []
|
right_slots = []
|
||||||
|
for elem in dir(ToolMixin):
|
||||||
|
if not elem.startswith('__'): security.declarePublic(elem)
|
||||||
|
|
||||||
# Tool constructor has no id argument, the id is fixed.
|
# Tool constructor has no id argument, the id is fixed.
|
||||||
def __init__(self, id=None):
|
def __init__(self, id=None):
|
||||||
|
|
|
@ -177,7 +177,7 @@ class MemoryBuffer(Buffer):
|
||||||
actionRex = re.compile('(?:(\w+)\s*\:\s*)?do\s+(\w+)(-)?' \
|
actionRex = re.compile('(?:(\w+)\s*\:\s*)?do\s+(\w+)(-)?' \
|
||||||
'(?:\s+(for|if|else|with)\s*(.*))?')
|
'(?:\s+(for|if|else|with)\s*(.*))?')
|
||||||
forRex = re.compile('\s*([\w\-_]+)\s+in\s+(.*)')
|
forRex = re.compile('\s*([\w\-_]+)\s+in\s+(.*)')
|
||||||
varRex = re.compile('\s*([\w\-_]+)\s+=\s+(.*)')
|
varRex = re.compile('\s*([\w\-_]+)\s*=\s*(.*)')
|
||||||
def __init__(self, env, parent):
|
def __init__(self, env, parent):
|
||||||
Buffer.__init__(self, env, parent)
|
Buffer.__init__(self, env, parent)
|
||||||
self.content = u''
|
self.content = u''
|
||||||
|
|
Loading…
Reference in a new issue