Jörn Nettingsmeier wrote:
Michael Wechner wrote:
MOSSELMANS Rudi (OPOCE) wrote:
Hi Tim,

I have changed workflow.xml adding a transition from authoring straight to live for reviewers:

  <transition source="authoring" destination="live">
   <event id="publish"/>
<condition class="org.apache.lenya.cms.workflow.RoleCondition">review</condition>
   <assign variable="is_live" value="true"/>
 </transition>

sounds reasonable , that a reviewer can publish directly without having to submit. Maybe we should patch
the src accordingly. WDYT?

sounds like a good idea to me. i'll add a patch against trunk to bugzilla.

rudi, i just tried your suggestion in 1.4, and it does not work. when i hit "publish" as a user with admin, edit and review groups on a document in authoring mode, i get:

The single document cannot be published because the workflow event cannot be invoked.

a casual glance showed this piece of code: src/pubs/default/modules/defaultusecases/java/src/org/apache/lenya/defaultpub/cms/usecases/Publish.java

 protected void doCheckPreconditions() throws Exception {
        super.doCheckPreconditions();
        if (!hasErrors()) {

            String event = getEvent();
            Document document = getSourceDocument();

            if (!document.getArea().equals(Publication.AUTHORING_AREA)) {
addErrorMessage("This usecase can only be invoked from the authoring area.");
                return;
            }

            if (!WorkflowUtil.canInvoke(this.manager,
                    getSession(),
                    getLogger(),
                    getSourceDocument(),
                    event)) {
setParameter(ALLOW_SINGLE_DOCUMENT, Boolean.toString(false)); addInfoMessage("The single document cannot be published because the workflow event cannot be invoked.");
            } else {
setParameter(ALLOW_SINGLE_DOCUMENT, Boolean.toString(true));
            }
...

i traced the canInvoke call back to AbstractLogEnabled, and then gave up.. can somebody more familiar with the code explain?


the problem may be due to today's changes in svn concerning the usecase authorizer (we have moved to deny-by-default), but i can invoke both usecases one after the other without problems, only the direct publish fails.

regards,

jörn




--
"Open source takes the bullshit out of software."
        - Charles Ferguson on TechnologyReview.com

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: [EMAIL PROTECTED], Telefon: 0203/379-2736

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to