[wf] should use is_in_group to avoid error with internal manager stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 07 Apr 2010 10:05:04 +0200
branchstable
changeset 5164 4d99cccffe36
parent 5157 1202e6565aff
child 5172 865a3e522add
[wf] should use is_in_group to avoid error with internal manager
hooks/workflow.py
--- a/hooks/workflow.py	Tue Apr 06 18:36:09 2010 +0200
+++ b/hooks/workflow.py	Wed Apr 07 10:05:04 2010 +0200
@@ -193,7 +193,7 @@
             raise ValidationError(entity.eid, {None: msg})
         # True if we are coming back from subworkflow
         swtr = session.transaction_data.pop((forentity.eid, 'subwfentrytr'), None)
-        cowpowers = ('managers' in session.user.groups
+        cowpowers = (session.user.is_in_group('managers')
                      or not session.write_security)
         # no investigate the requested state change...
         try: