How to list customized skin items and their owners
by
T. Kim Nguyen
—
last modified
Oct 07, 2010 12:03 PM
.listCustomizedSkinItems, a script that iterates over all the Plone sites in your Zope
When someone customizes skin items via ZMI portal_skin/custom, it appears to cause a problem when the customized items' owner no longer has Manager role.
The symptom seems to be that even someone with Manager role can no longer see an item's Edit tab.
This script identifies the customized skin items and shows their owner. When you click on the link, it takes you to the ZMI Ownership tab for the customized skit item, where you can then take ownership of the item.
# Script to place in Zope root that lists the customized views and their owners
# in all the contained Plone sites.
outln = []
outln.append("starting...")
def doIt(site):
outln.append("Plone site '%s':" % site.id)
customizations = site.portal_skins.custom
items = customizations.items()
for i in items:
s, obj = i
outln.append(" %s <a href='%s'>%s</a>" % (obj.owner_info()['id'], obj.absolute_url()+'/manage_owner', s))
for itemTuple in context.items():
(item, itemType) = itemTuple
if str(itemType).startswith('<PloneSite at '):
site = getattr(context, item)
doIt(site)
elif str(itemType).startswith('<Folder at '):
folder = getattr(context, item)
for folderItemTuple in folder.items():
(folderItem, folderItemType) = folderItemTuple
if str(folderItemType).startswith('<PloneSite at '):
site = getattr(folder, folderItem)
doIt(site)
outln.append("done")
return '<br>'.join(outln)











