appy.gen: removed fields Tool.showWorkflowCommentFieldForxx (workflow comment may not be entered into the confirm popup); appy.gen: security-related bugfixes.
This commit is contained in:
parent
cbb8d5cd12
commit
f6a828bc13
12 changed files with 67 additions and 32 deletions
|
@ -95,10 +95,6 @@ class ToolWrapper(AbstractWrapper):
|
|||
Stores the boolean field indicating if we must show workflow-
|
||||
related information for p_klass or not.
|
||||
|
||||
"showWorkflowCommentField"
|
||||
Stores the boolean field indicating if we must show the field
|
||||
allowing to enter a comment every time a transition is triggered.
|
||||
|
||||
"showAllStatesInPhase"
|
||||
Stores the boolean field indicating if we must show all states
|
||||
linked to the current phase or not. If this field is False, we
|
||||
|
@ -133,4 +129,29 @@ class ToolWrapper(AbstractWrapper):
|
|||
expression="ctx['nb'] += int(obj.o.refreshSecurity())")
|
||||
msg = 'Security refresh: %d object(s) updated.' % context['nb']
|
||||
self.log(msg)
|
||||
|
||||
def refreshCatalog(self, startObject=None):
|
||||
'''Reindex all Appy objects. For some unknown reason, method
|
||||
catalog.refreshCatalog is not able to recatalog Appy objects.'''
|
||||
if not startObject:
|
||||
# This is a global refresh. Clear the catallog completely, and then
|
||||
# reindex all Appy-managed objects, ie those in folders "config"
|
||||
# and "data".
|
||||
# First, clear the catalog.
|
||||
app = self.o.getParentNode()
|
||||
app.catalog._catalog.clear()
|
||||
app.config.reindex()
|
||||
nb = 1
|
||||
for obj in app.config.objectValues():
|
||||
nb += self.refreshCatalog(startObject=obj)
|
||||
# Then, refresh objects in the "data" folder.
|
||||
for obj in app.data.objectValues():
|
||||
nb += self.refreshCatalog(startObject=obj)
|
||||
print '%d object(s) were reindexed.' % nb
|
||||
else:
|
||||
startObject.reindex()
|
||||
nb = 1
|
||||
for obj in startObject.objectValues():
|
||||
nb += self.refreshCatalog(startObject=obj)
|
||||
return nb
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -129,6 +129,7 @@ class ZopeUserPatches:
|
|||
'''Returns the global roles that this user (or any of its groups)
|
||||
possesses.'''
|
||||
res = list(self.roles)
|
||||
if 'Anonymous' not in res: res.append('Authenticated')
|
||||
# Add group global roles
|
||||
if not hasattr(aq_base(self), 'groups'): return res
|
||||
for roles in self.groups.itervalues():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue