Added allowDangerousOperation() check to the clear command