# HG changeset patch # User Sylvain Thénault # Date 1256130749 -7200 # Node ID 14fde27a70a2d4bd730337339c466b49f3b69037 # Parent 316d0b524db821f8726a5dc62f1b9f70deb8d7f0 don't allow that even with cow powers diff -r 316d0b524db8 -r 14fde27a70a2 server/hooks.py --- a/server/hooks.py Wed Oct 21 14:39:26 2009 +0200 +++ b/server/hooks.py Wed Oct 21 15:12:29 2009 +0200 @@ -13,7 +13,7 @@ from cubicweb import UnknownProperty, ValidationError, BadConnectionId from cubicweb.schema import RQLVocabularyConstraint from cubicweb.server.pool import Operation, LateOperation, PreCommitOperation -from cubicweb.server.hookhelper import (check_internal_entity, +from cubicweb.server.hookhelper import (check_internal_entity, get_user_sessions, rproperty) from cubicweb.server.repository import FTIndexEntityOp @@ -519,8 +519,8 @@ msg = session._('mandatory relation') raise ValidationError(entity.eid, {'by_transition': msg}) deststate = wf.state_by_eid(deststateeid) - if not cowpowers and deststate is None: - msg = entity.req._("state doesn't belong to entity's workflow") + if deststate is None: + msg = entity.req._("state doesn't belong to entity's current workflow") raise ValidationError(entity.eid, {'to_state': msg}) else: # check transition is valid and allowed, unless we're coming back from