[Zope3-checkins]
SVN: Zope3/branches/mgedmin-security/src/zope/app/workflow/stateful/instance.py
Changed zope.app.workflow to use zope.security.checkPermission.
Marius Gedminas
marius at pov.lt
Wed May 12 15:24:37 EDT 2004
Log message for revision 24602:
Changed zope.app.workflow to use zope.security.checkPermission.
-=-
Modified: Zope3/branches/mgedmin-security/src/zope/app/workflow/stateful/instance.py
===================================================================
--- Zope3/branches/mgedmin-security/src/zope/app/workflow/stateful/instance.py 2004-05-12 19:21:59 UTC (rev 24601)
+++ Zope3/branches/mgedmin-security/src/zope/app/workflow/stateful/instance.py 2004-05-12 19:24:33 UTC (rev 24602)
@@ -41,6 +41,7 @@
from zope.security.management import getSecurityManager
from zope.security.checker import CheckerPublic, Checker
from zope.security.proxy import Proxy
+from zope.security import checkPermission
from zope.tales.engine import Engine
@@ -273,7 +274,6 @@
return script(contexts)
def _outgoingTransitions(self, clean_pd):
- sm = getSecurityManager()
ret = []
contexts = self._getContext()
@@ -281,11 +281,7 @@
if self.status == trans.sourceState:
# check permissions
permission = trans.permission
- #
- if (permission is not None
- and permission is not CheckerPublic
- and not sm.checkPermission(permission, self)
- ):
+ if not checkPermission(permission, self):
continue
ctx = self._extendContext(trans, contexts)
More information about the Zope3-Checkins
mailing list