Showing posts with label Download Action. Show all posts
Showing posts with label Download Action. Show all posts

Saturday, November 30, 2013

Disable Download Action in offline editing



      How to disable Download Action in Document Library when a document is locked for offline editing?

Using Evaluator: evaluator.doclib.action.isWorkingCopy (An OOTB evaluator which checks whether a node is a working copy or not), we can configure Download Action to be visible or not in the UI.

Add the following entry in Alfresco_Home/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml file.

< !-- Document Library Actions config section -- >
< config evaluator="string-compare" condition="DocLibActions" >

    < !--
       Action definitions
    -- >
    < actions >
       
       < !-- Download document -- >
       < action id="document-download" type="link" label="actions.document.download" >
         
         < param name="href" >{downloadUrl}</ param >

       < !--
       Evaluator to Disable Download action when document is locked by a user
       -- >
          < evaluator negate="true" >evaluator.doclib.action.isWorkingCopy</ evaluator >
       </ action >


    </ actions >
</ config >

     For more info, refer following link: