cubicweb #15045719 fire_transition does not consider write security [in-progress]

So you cannot disable security in a hook and fire a transition: you get a "transition may not be fired" message.

A quick and dirty monkey patch for it looks like:

from cubicweb.entities.wfobjs import BaseTransition

old_may_be_fired = BaseTransition.may_be_fired


def new_may_be_fired(self, eid):
    if not getattr(self._cw, 'write_security', True):
        return True
    else:
        return old_may_be_fired(self, eid)

BaseTransition.may_be_fired = new_may_be_fired
prioritynormal
typebug
done in<not specified>
closed by<not specified>
patchWIP [entities] consider write security when checking if a transition can be fired [in-progress]