[Zope3-checkins] SVN: Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/pd_subscribers.py Add subscriber reacting on the update of permissions on the process definition. We could react differently on this one

Julien Anguenot ja at nuxeo.com
Wed Oct 13 16:57:37 EDT 2004


Log message for revision 28128:
  Add subscriber reacting on the update of permissions on the process definition. We could react differently on this one

Changed:
  A   Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/pd_subscribers.py

-=-
Added: Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/pd_subscribers.py
===================================================================
--- Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/pd_subscribers.py	2004-10-13 20:56:52 UTC (rev 28127)
+++ Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/pd_subscribers.py	2004-10-13 20:57:35 UTC (rev 28128)
@@ -0,0 +1,34 @@
+##############################################################################
+#
+# Copyright (c) 2004 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+
+"""Process definition permissions changed subscribers
+
+$Id:$
+"""
+
+def processDefinitionAddPermissionsSusbcriber(event):
+    """Add permissions to the process definition permissions mapping
+    """
+    pd = event.object
+    permissions_to_add = event.permissions_to_add
+    for permission in permissions_to_add:
+        pd.addProcessPermission(permission)
+
+def processDefinitionDelPermissionsSusbcriber(event):
+    """Del permissions to the process definition permissions mapping
+    """
+    pd = event.object
+    permissions_to_remove = event.permissions_to_remove
+    for permission in permissions_to_remove:
+        pd.delProcessPermission(permission)



More information about the Zope3-Checkins mailing list