How to disable Macros for all users

G’day folks!

I want to disable all the macro tools in Libreoffice for a system with multiple users. The critical part is i don’t want those user to enable macros ever.

So this is what I have tried already:

I created a .xcd xml file in /usr/lib/libreoffice/share/registry/lockdown.xcd

I added the xml below:

<?xml version="1.0" encoding="UTF-8" ?>
<oor:node oor:name="Commands"
oor:package="org.openoffice.Office"
xmlns:oor="http://openoffice.org/2001/registry"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <node oor:name="Execute">
    <node oor:name="Disabled">
      <node oor:name="ToolsMacroEdit" oor:op="replace">
        <prop oor:name="Command">
          <value>ToolsMacroEdit</value>
        </prop>
      </node>
    </node>
  </node>
 </oor:node>

If I understand right, this would only disable the ‘ToolsMacroEdit’ option, and not the rest of the macro stuff, so I tried opening LibreOffice to test it and it fails to open:

terminate called after throwing an instance of 'com::sun::star::uno::RuntimeException'

So my question is:

How do I disable Macros for all users on a Linux (Debian 7) system?

REFS:

https://wiki.openoffice.org/wiki/Documentation/Administration_Guide/Restricting_functionality

https://wiki.openoffice.org/wiki/Framework/Article/OpenOffice.org_2.x_Commands#Writer_commands

Please, I need this too. And I think we all do, in these times of locky ransomware and similar malware.

There must be a way how to disable macros globally for all users (both existing and future). For MS Office, this can be done via GPO and Administrative Templates.

I hope there is a way for LibreOffice, too, otherwise, I cannot have it on multiuser Windows server machine, because there are working also “lame” users - and they (and the server) need to be protected :frowning: