Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move about:support add-on to AMO.

* URL for the add-on is now a setting, to change it easily.
* AMO will provide automatic updates to the add-on. We could have done
  this in SUMO, but it is not trivial.
* The url used here will automatically point to the latest version.
* Remove the old add-on from the media directory.t
* Add docs about the add-on.
* The version of the add-on in AMO will work on -dev and -stage.
  • Loading branch information...
commit f50155d3026955fea2475a7d0634ae7722b10fb4 1 parent 1c4a8a9
@mythmon authored
View
2  apps/questions/templates/questions/includes/aaq_macros-new.html
@@ -198,7 +198,7 @@ <h2 class="no-results">{{ _('This question has not been asked before.') }}</h2>
{% macro troubleshooting_instructions(field) %}
<span id="troubleshooting-install">
- <a href="/media/addons/troubleshooter.xpi" class="btn btn-important" id="install-troubleshooting-addon">
+ <a href="{{ settings.TROUBLESHOOTER_ADDON_URL }}" class="btn btn-important" id="install-troubleshooting-addon">
{{ _('Automatically add') }}
</a>
<span>
View
4 apps/questions/templates/questions/includes/question_editing_frame.html
@@ -12,8 +12,8 @@
{% extends "questions/base.html" %}
{% from "layout/errorlist.html" import errorlist %}
{% from "includes/common_macros.html" import content_editor with context %}
-{% from "questions/includes/aaq_macros-new.html" import selected_product, selected_category,
- troubleshooting_instructions %}
+{% from "questions/includes/aaq_macros-new.html" import selected_product, selected_category %}
+{% from "questions/includes/aaq_macros-new.html" import troubleshooting_instructions with context %}
{% set classes = 'new-question' %}
{% block content %}
View
10 apps/sumo/helpers.py
@@ -400,3 +400,13 @@ def ga_push_attribute(context):
ga_push.append(['_setCustomVar', 1, 'User Type', 'Registered', 1])
return jsonlib.dumps(ga_push)
+
+
+@register.function
+@jinja2.contextfunction
+def is_secure(context):
+ request = context.get('request')
+ if request and hasattr(request, 'is_secure'):
+ return context.get('request').is_secure()
+
+ return False
View
1  docs/index.rst
@@ -33,6 +33,7 @@ Part 2: Developer's Guide
karma
vendor
wikidocs
+ notes
licenses
View
34 docs/notes.rst
@@ -0,0 +1,34 @@
+.. _notes-chapter:
+
+===========
+Other Notes
+===========
+
+Questions
+=========
+
+Troubleshooter Add-on
+---------------------
+
+When asking a question, users are prompted to install an addon that will return
+extra information to SUMO from about:support. This is opt-in, and considered
+generally non-sensitive data, but is not revelaed to all sites because of
+fingerprinting concerns.
+
+This add-on only provides data to white listed domains. The built in whitelist
+is:
+
+- https://support.mozilla.org/
+- https://support.allizom.org/
+- https://support-dev.allizom.org/
+- http://localhost:8000/
+
+Note that the protocol and port are significant. If you try and run the site on
+http://localhost:8900/, the add-on will not provide any data.
+
+The source of the addon is `on GitHub`_, and it is hosted `on
+AMO`_. The add-on is hosted on AMO instead of SUMO so that AMO will do
+the heavy lifting of providing automatic updates.
+
+.. _on Github: https://github.com/0c0w3/troubleshooter
+.. _on AMO: https://addons.mozilla.org/en-US/firefox/addon/troubleshooter/
View
BIN  media/addons/troubleshooter.xpi
Binary file not shown
View
4 settings.py
@@ -1033,3 +1033,7 @@ def read_only_mode(env):
# Change the default for XFrameOptionsMiddleware.
X_FRAME_OPTIONS = 'DENY'
+
+# Where to find the about:support troubleshooting addon.
+# This is a link to the latest version, whatever that may be.
+TROUBLESHOOTER_ADDON_URL = 'https://addons.mozilla.org/firefox/downloads/latest/426841/addon-426841-latest.xpi'
Please sign in to comment.
Something went wrong with that request. Please try again.