Commit permissions API by @AbrarSyed, with some stuff by me
CommandBase patch - add permission info to all commands
CommandHandler patch = implement proper permission checking for commands.