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

Saturday, November 30, 2013

Disable Publish Action in Share Document Library


      How to disable Publish Action in Document Library for all the users?

Using Evaluator, we can configure Document Actions 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>

        < !-- Publish document -- >
         < action id="document-publish" type="javascript" label="actions.document.publish" >

            <param name="function">onActionPublish</param>

            < !--
             Evaluator to disable Pulish Document Action for all users.
            -- >
            < evaluator>evaluator.doclib.action.disableAction</ evaluator>

            < evaluator negate="true"> evaluator.doclib.action.isLocked</ evaluator>
         </ action>

    </ actions>
</ config>

evaluator.doclib.action.disableAction :  This is an OOTB evaluator which always return false.

For more info, refer following link:
OOTB evaluators: http://wiki.alfresco.com/wiki/Document_Library_Predefined_Evaluators