]> CRI, Mines Paris - PSL - Plinn.git/blobdiff - Products/Plinn/skins/generic/getPendingDocuments.py
Déplacement pour eggification.
[Plinn.git] / Products / Plinn / skins / generic / getPendingDocuments.py
diff --git a/Products/Plinn/skins/generic/getPendingDocuments.py b/Products/Plinn/skins/generic/getPendingDocuments.py
new file mode 100644 (file)
index 0000000..a30d921
--- /dev/null
@@ -0,0 +1,14 @@
+##parameters=
+ctool = context.portal_catalog
+checkPerm = context.portal_membership.checkPermission
+res = []
+for s in ['pending'] : # other states can be added
+       res.extend(ctool(review_state=s))
+
+pend = []
+for b in res :
+       ob = b.getObject()
+       if checkPerm('Review portal content', ob) :
+               pend.append(ob)
+
+return pend