Added permission handling for commands