[Zope3-checkins] CVS: Zope3/src/zope/app/workflow/stateful -
instance.py:1.16.2.4
Marius Gedminas
marius at pov.lt
Fri Mar 19 13:51:24 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/workflow/stateful
In directory cvs.zope.org:/tmp/cvs-serv26650/src/zope/app/workflow/stateful
Modified Files:
Tag: mgedmin-events2-branch
instance.py
Log Message:
Added IParticipation and replaced the lists of principals in IInteraction with
a list of participations. Made BaseRequest an IParticipation and replaced
request.user with request.principal everywhere.
=== Zope3/src/zope/app/workflow/stateful/instance.py 1.16.2.3 => 1.16.2.4 ===
--- Zope3/src/zope/app/workflow/stateful/instance.py:1.16.2.3 Mon Mar 8 16:50:58 2004
+++ Zope3/src/zope/app/workflow/stateful/instance.py Fri Mar 19 13:50:51 2004
@@ -38,7 +38,7 @@
from zope.interface import directlyProvides, implements
from zope.proxy import removeAllProxies
from zope.schema import getFields
-from zope.security.management import getInteraction, getSecurityPolicy
+from zope.security.management import getInteraction
from zope.security.checker import CheckerPublic, Checker
from zope.security import checkPermission
from zope.security.proxy import Proxy
@@ -226,7 +226,7 @@
ctx = {}
# data should be readonly for condition-evaluation
ctx['data'] = self.data
- principals = list(getInteraction().principals)
+ principals = [p.principal for p in getInteraction().participations]
assert len(principals) == 1 # XXX
ctx['principal'] = principals[0]
@@ -277,8 +277,6 @@
return script(contexts)
def _outgoingTransitions(self, clean_pd):
- policy = getSecurityPolicy()
- interaction = getInteraction()
ret = []
contexts = self._getContext()
More information about the Zope3-Checkins
mailing list