X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/3c4367d8e03450e9a73e61f4247145d2b6c86a33..959d888c17d1403d2eeecc19bc4b5e2c8d1debf6:/Products/Plinn/skins/generic/havePendingContents.py diff --git a/Products/Plinn/skins/generic/havePendingContents.py b/Products/Plinn/skins/generic/havePendingContents.py new file mode 100644 index 0000000..3d58673 --- /dev/null +++ b/Products/Plinn/skins/generic/havePendingContents.py @@ -0,0 +1,9 @@ +##parameters= +ctool = context.portal_catalog +checkPerm = context.portal_membership.checkPermission +from Products.CMFCore.permissions import ReviewPortalContent +for s in ['pending'] : # other states can be added + for b in ctool(review_state=s) : + if checkPerm(ReviewPortalContent, b.getObject()) : + return True +return False \ No newline at end of file