public void RunCommand(string cmd) { if (isAdmin) { executor.RunCommand(cmd); } else { if (cmd.Trim().StartsWith("rm")) { throw new Exception("rm Command is not Allowed!"); } else { executor.RunCommand(cmd); } } }