Changeset 29781

Show
Ignore:
Timestamp:
01/30/08 14:59:21 (10 months ago)
Author:
atchertchian
Message:

NXP-2015: cannot delete an approved document (fwd from r29674)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.nuxeo.ecm.core/trunk/nuxeo-core/src/main/resources/OSGI-INF/LifeCycleCoreExtensions.xml

    r29482 r29781  
    44 
    55  <documentation> 
    6       Nuxeo core life cycle contributions. 
     6    Nuxeo core life cycle contributions. 
    77 
    8       @version 1.0 
    9       @author <a href="mailto:ja@nuxeo.com">Julien Anguenot</a> 
     8    @version 1.0 
     9    @author <a href="mailto:ja@nuxeo.com">Julien Anguenot</a> 
    1010  </documentation> 
    1111 
    12   <require>org.nuxeo.ecm.core.repository.jcr.lifecycle.JCRLifeCycleManager</require> 
     12  <require> 
     13    org.nuxeo.ecm.core.repository.jcr.lifecycle.JCRLifeCycleManager 
     14  </require> 
    1315 
    14   <extension target="org.nuxeo.ecm.core.lifecycle.LifeCycleService" 
    15       point="lifecycle"> 
     16  <extension target="org.nuxeo.ecm.core.lifecycle.LifeCycleService" 
     17    point="lifecycle"> 
    1618 
    1719    <documentation> 
     
    4547          </transitions> 
    4648        </state> 
    47         <state name="approved" description="Content has been validated"/> 
     49        <state name="approved" description="Content has been validated"> 
     50          <transitions> 
     51            <transition>delete</transition> 
     52          </transitions> 
     53        </state> 
    4854        <state name="obsolete" description="Content is obsolete"> 
    4955          <transitions> 
     
    6167 
    6268  <extension target="org.nuxeo.ecm.core.lifecycle.LifeCycleService" 
    63           point="types"> 
     69    point="types"> 
    6470 
    6571    <documentation> 
  • org.nuxeo.ecm.platform/trunk/nuxeo-platform-webapp-core/src/main/java/org/nuxeo/ecm/webapp/action/DeleteActionsBean.java

    r29565 r29781  
    505505                document.followTransition(DELETE_TRANSITION); 
    506506            } else { 
     507                // FIXME: should be checked sooner so that no exception is thrown 
    507508                throw new ClientException("Impossible to move document=" 
    508509                        + docModel.getPathAsString() 
     
    874875    } 
    875876 
    876     public boolean getCanRestoreCurrentDoc() throws ClientException{ 
     877    // FIXME: should check permissions 
     878    public boolean getCanRestoreCurrentDoc() throws ClientException { 
    877879        DocumentModel currentDoc = navigationContext.getCurrentDocument(); 
    878880        if (currentDoc != null) {