From: Youenn B. <svn...@pl...> - 2011-06-30 16:35:05
|
Author: yboussard Date: Thu Jun 30 16:33:44 2011 New Revision: 241715 Modified: Products.PloneSubscription/trunk/Products/PloneSubscription/SubscriptionTool.py Log: fix bug when we retrieve workflow subscription Modified: Products.PloneSubscription/trunk/Products/PloneSubscription/SubscriptionTool.py ============================================================================== --- Products.PloneSubscription/trunk/Products/PloneSubscription/SubscriptionTool.py (original) +++ Products.PloneSubscription/trunk/Products/PloneSubscription/SubscriptionTool.py Thu Jun 30 16:33:44 2011 @@ -866,9 +866,12 @@ # Search as subscribed user newSecurityManager(None, user) unfiltered_brains = subscription.getQueryBrains() - brains = subscription.afterQueryFilters(unfiltered_brains) - # Restore current user + # Restore current user newSecurityManager(None, current_user) + ## Very important : afterQueryFilters must be call \ + ## with admin acces for having workflow_history + brains = subscription.afterQueryFilters(unfiltered_brains) + Log(LOG_DEBUG, 'brains for a valid user all/filtered:', unfiltered_brains, brains) # /!\ Be careful: brains are LazyMap but not list or tuple. if brains: |