Node templates by Site in Alfresco

Alfresco provides a feature to set files as templates. However, every file uploaded to Repository > Data Dictionary > Node Templates will be available as template for every user in every site.

Let’s see how can we tweak permissions in order to have different templates for different sites.

Initial situation

We are using two sites in this sample with following properties:

  • Accounting and Finance
    • Short name: accounting-and-finance
    • Internal group name: GROUP_site_accounting-and-finance
    • Required template: CV.docx
  • Purchasing
    • Short name: purchasing
    • Internal group name: GROUP_purchasing
    • Required template: PO.xlxs

Both CV.docx and PO.xlxs files are uploaded to Repository > Data Dictionary > Node Templates by using Share uploading feature.

Manage Permissions

As Share web interface does not expose internal groups to actions, it’s required to use a tool like JavaScript Console to make this setting.

For document CV.docx following sentences are executed:

document.setPermission("Read", "GROUP_site_accounting-and-finance");;

For document PO.xlxs following sentences are executed:

document.setPermission("Read", "GROUP_site_purchasing");;

After executing these operations, regular Manage Permissions action is used to unset Inherit Permissions.


From this point users from site Accounting and Finance will only have available CV.docx from Create document from template option and users from site Purchasing will only have available PO.xlsx from Create document from template option.

This is a so simple approach, that I’ve been internally forced to create a new addon available at

Check it out!



Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de

Estás comentando usando tu cuenta de Cerrar sesión /  Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )

Conectando a %s