In the Data Editor you can add "Uncommandable" to the Flags-property of the unit to make the user unable to use ANY commands.
Otherwise you can use a trigger with this action:
UI - Disable Smart Click for (All players) commands
Works like a charm, just tested it :P
PS: In the list it is called: Enable/Disable Command Functionality. You have to select Smart Clicks from there.