update requests for disabled extensions should have some "disabled" indicator in the request

RESOLVED FIXED in mozilla1.8.1beta1

Status

()

Toolkit
Add-ons Manager
RESOLVED FIXED
12 years ago
10 years ago

People

(Reporter: shaver, Assigned: mossop)

Tracking

({fixed1.8.1})

1.8 Branch
mozilla1.8.1beta1
fixed1.8.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

When we fetch update information for a disabled extension, it would be good to have some way of telling on the server side that the extension was disabled.

This would be useful information for extension authors, and would also help us make sure that blacklisted extensions are being treated appropriately.

We could put it in the URL via another %EXT_STATUS% substitution, or add an X-Mozilla-Extension-Status: header to the request, as two options that come immediately to mind.
There are two types of disabled props - app disabled and user disabled. They are independent of each other so it may be best to send both.
We could do a comma-separated set of status flags, or something:

status=ok
status=appdisabled
status=appdisabled,userdisabled
status=blacklisted

(or more compact versions of those, if desired)
This is trivial to add and I'll try to do so in the next couple of days if I can get / come up with a finalized set of codes to return. An add-on that is blocklisted is also appDisabled so instead of returning appDisabled how about returning why it is appDisabled?

status=enabled
status=userDisabled

These 3 could potentially include userDisabled
status=blocklisted
status=incompatible
status=needsDependencies

Thoughts?
Those sound fine.  I presume we know all the reasons that an extension can be disabled (from our test suite for this, of course ;) ), but we can add new entries to that list later if we need, right?
taking before I forget about this
Assignee: nobody → robert.bugzilla
Whiteboard: .5d
Target Milestone: --- → Firefox 2 beta1
(Assignee)

Updated

12 years ago
Assignee: robert.bugzilla → mossop.bugzilla
(Assignee)

Comment 6

12 years ago
Created attachment 226079 [details] [diff] [review]
patch rev 1

Adds a %ITEM_STATUS% field to the update urls, made up as specified in comment 3. Also adds this field into the default update URL.
Attachment #226079 - Flags: review?(robert.bugzilla)
(Assignee)

Updated

12 years ago
Status: NEW → ASSIGNED
Comment on attachment 226079 [details] [diff] [review]
patch rev 1

>Index: toolkit/mozapps/extensions/src/nsExtensionManager.js.in
>===================================================================
>RCS file: /cvsroot/mozilla/toolkit/mozapps/extensions/src/nsExtensionManager.js.in,v
>retrieving revision 1.198
>diff -u -8 -p -r1.198 nsExtensionManager.js.in
>--- toolkit/mozapps/extensions/src/nsExtensionManager.js.in	15 Jun 2006 21:32:21 -0000	1.198
>+++ toolkit/mozapps/extensions/src/nsExtensionManager.js.in	18 Jun 2006 17:58:48 -0000
>@@ -6073,32 +6073,47 @@ RDFItemUpdater.prototype = {
...
>+    var itemStatus;
>+    if (emDS.getItemProperty(aItem.id, "userDisabled") == "true" ||
>+        emDS.getItemProperty(aItem.id, "userDisabled") == OP_NEEDS_ENABLE)
>+      itemStatus = "userDisabled";
>+    else
>+      itemStatus = "enabled";
After looking at it I think this would makes more sense if it were userEnabled.

r=me with that change.
Attachment #226079 - Flags: review?(robert.bugzilla) → review+
(Assignee)

Comment 8

12 years ago
Created attachment 226190 [details] [diff] [review]
patch rev 2

Addressed comment, carrying over review, ready for checkin.
Attachment #226079 - Attachment is obsolete: true
Attachment #226190 - Flags: review+
(Assignee)

Updated

12 years ago
Whiteboard: .5d → [needs checkin]
Whiteboard: [needs checkin] → [checkin needed]
Checked in on trunk. I'm going to let this bake for a couple of days before approving for 1.8.1. Thanks!
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Attachment #226190 - Flags: approval-branch-1.8.1+
I decided this is safe to land so checked in to MOZILLA_1_8_BRANCH for Firefox 2.0
Keywords: fixed1.8.1

Comment 11

12 years ago
Robert your checkin for bug 307358 extensions.properties rev 1.27 removes the changes made to extensions.update.url in rev 1.26 (only in trunk - not in 1.8_Branch).
(In reply to comment #11)
Thanks and fixed.
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.