cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco 4.2.d Remove publish option

hsturner
Champ on-the-rise
Champ on-the-rise
Hi,

We will be using Alfresco for out document management, but need to hide the publish option from the actions for documents when you click on more in the document library. This has to be done for Corporate security reasons, and we do not want the users to know they even have the option to publish.

How would I accomplish this?
3 REPLIES 3

parzgnat
Star Contributor
Star Contributor
The quick and dirty way to to this is to open the share-documentlibrary-config.xml located in the $ALFRESCO_HOME/tomcat/webapps/share/WEB-INF/classes/alfresco directory.  Once you find the file, comment out these lines in the XML file:


<action id="document-publish" type="javascript" label="actions.document.publish">
   <param name="function">onActionPublish</param>
   <evaluator negate="true">evaluator.doclib.action.isLocked</evaluator>
</action>

<action index="300" id="document-publish" />

<action index="340" id="document-publish" />


Note that this is not the "correct" way to do this.  The correct way is to create your own share-config-custom.xml file and duplicate/modify your actions configuration in your own share-config-custom.xml file.  This approach makes your customizations more portable and easier to upgrade.  More information on how to customize Share the right way can be found here: http://docs.alfresco.com/4.1/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Fdev-Share-i...

I hope this helps.

deepak1987
Star Contributor
Star Contributor
Hi,

The other approach is to add 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>

progdevtom
Champ in-the-making
Champ in-the-making
Hi Deepak,
do you also know what to do to completely remove the publishing history from document-details?

I would like to have the publishing side of alfresco completely removed from view.

thanks for any suggestions.

tom