[CMF-checkins] CVS: CMF/DCWorkflow - Guard.py:1.13
Zachery Bir
zbir at urbanape.com
Wed Mar 17 09:00:39 EST 2004
Update of /cvs-repository/CMF/DCWorkflow
In directory cvs.zope.org:/tmp/cvs-serv4724
Modified Files:
Guard.py
Log Message:
Reverted pending tests and further work.
=== CMF/DCWorkflow/Guard.py 1.12 => 1.13 ===
--- CMF/DCWorkflow/Guard.py:1.12 Tue Mar 16 22:00:50 2004
+++ CMF/DCWorkflow/Guard.py Wed Mar 17 09:00:38 2004
@@ -67,18 +67,12 @@
if self.groups:
# Require at least one of the specified groups.
u = sm.getUser()
- b = aq_base( u )
- if hasattr( b, 'getContextualGroupMonikers' ):
- u_groups = u.getContextualGroupMonikers( ob )
- elif hasattr( b, 'getGroupsInContext' ):
- u_groups = u.getGroupsInContext( ob )
- elif hasattr( b, 'getGroups' ):
- u_groups = u.getGroups()
+ if hasattr(aq_base(u), 'getContextualGroupMonikers'):
+ u_groups = u.getContextualGroupMonikers(ob)
else:
u_groups = ()
for group in self.groups:
- if ( group in u_groups
- or '(Group) %s' % group in u_groups ):
+ if ('(Group) %s' % group) in u_groups:
break
else:
return 0
More information about the CMF-checkins
mailing list