In Alfresco 5 we have added two new types of events to the activity stream – for documentDownload and Preview events. Some concerns have been raised about the number of activities that may be added to the site or user streams and also concerns around privacy – seeing what documents other users have been downloading or previewing.

Firstly, the ability of the server to process activities has been improved considerably since Alfresco 4. The activity processing is now multi-threaded and also handles more activities per stream.

Secondly, the same ACL/permission enforcement that has always been present in Alfresco is still present in 5.0 – that has not changed! So the ability to see a public document is still the same for all users and if a document is private, it will remain private. For example if you add/modify/download a document that is private to you then activity events for the action will not appear on the public activity stream for other users in the site.


The activities which are processed by the system is actually very easy to configure in the Alfresco repository – and always has been. A simple config file change is all that is need to disable certain activities from the stream processing. For example if you are still concerned about the Download and Preview activities and want to disable them, then this is how you would do it.

In the Alfresco repository tomcat instance, in the tomcat/shared/classes/alfresco/extensionfolder create a new spring context XML file. I have called mine configure-activities-context.xml but you can call it anything that ends in -context.xml or add the config to an existing extension file if you prefer.

The beans that process activities work against a list of known activity types – the types that are generated by applications such as Alfresco Share. To remove the Download and Preview activities we identify the IDs of those activities which are org.alfresco.documentlibrary.file-previewed and org.alfresco.documentlibrary.file-downloaded and remove them from the list for the documentLibraryActivitySummaryProcessor bean definition.

<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns="http://www.springframework.org/schema/beans"
 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
 <bean id="documentLibraryActivitySummaryProcessor" class="org.alfresco.rest.api.impl.activities.BaseActivitySummaryProcessor">
 <property name="registry" ref="activitySummaryParser" />
 <property name="eventTypes">

Restart Alfresco and that’s it, no more Download and Preview activities. You can modify the bean config above to remove any other activity types you don’t like from the list that gets processed by the system.


Laisser un commentaire

Choisissez une méthode de connexion pour poster votre commentaire:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion /  Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion /  Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion /  Changer )


Connexion à %s