Closed
Bug 711131
Opened 13 years ago
Closed 13 years ago
implement uninstall() method
Categories
(Web Apps :: HTML, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: mhanson, Assigned: ianbicking)
References
Details
(Whiteboard: [production-affected])
For parity with the Gecko API [1], the HTML implementation should support an uninstall() method exposed to content.
It should be subject to stringent security checks: The current algorithm is that an application in allowed to uninstall itself, or an application that it installed.
[1] http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/apps/nsIDOMApplicationRegistry.idl
Comment 1•13 years ago
|
||
The current implementation is even more stringent: only application having the "webapps-manage" privilege can use uninstall().
There's no reason a store could silently delete apps you buyed/installed I think.
Reporter | ||
Comment 2•13 years ago
|
||
There's a corner-case, though: handling refunds.
If the user has requested a refund, and the store has processed it, the user is left with an app which will never work. We could choose to make deleting this app the user's responsibility, but that is probably error-prone. So providing some path for the store to delete the app in this case is probably useful.
There's nothing that says it has to be "silent", though - we could definitely do a consent step.
Assignee | ||
Comment 3•13 years ago
|
||
(In reply to Michael Hanson from comment #2)
> There's a corner-case, though: handling refunds.
>
> If the user has requested a refund, and the store has processed it, the user
> is left with an app which will never work. We could choose to make deleting
> this app the user's responsibility, but that is probably error-prone. So
> providing some path for the store to delete the app in this case is probably
> useful.>
The store should have a way to remove invalid receipts (though we don't have any methods for that currently). If the app (through its manifest) could indicate it required a receipt, would it be sensible to hide the application once the store has removed the last valid receipt? This also adds an application state that is essentially available-but-probably-won't-work, which is perhaps a good state to have, we could present these apps elsewhere in a way that helps the user track what has happened. (For that matter, being able to mark a receipt as invalid without removing the receipt might itself be a useful feature.)
Assignee | ||
Comment 4•13 years ago
|
||
Addition to just the HTML implementation:
https://github.com/mozilla/openwebapps/pull/158
This does not change the permission model for HTML (which is currently just a whitelist).
Comment 5•13 years ago
|
||
This is a API-level bug in the HTML implementation. Probably should have David Clarke verify this bug.
QA Contact: dclarke
Comment 6•13 years ago
|
||
Ian, to verify this bug, what should QA be looking for? Are we testing to make sure uninstalling an application still works on the HTML 5 dashboard?
Comment 7•13 years ago
|
||
Also - On the API-level, should I basically test this function (https://developer.mozilla.org/en/Apps/Apps_JavaScript_API/navigator.mozApps.mgmt.uninstall) in the specification and make sure it abides by the specification?
Comment 8•13 years ago
|
||
Actually disregard comment 7 (the API has changed, uninstall() takes no params according to the first comment).
Assignee | ||
Comment 9•13 years ago
|
||
Something like this should work (on a privileged page):
navigator.mozApps.getAll().onsuccess = function () {
this.result[0].uninstall().onsuccess = function () {alert('success!');};
};
There are also tests in repo_api.html for this.
Updated•13 years ago
|
Whiteboard: [staging-fixed]
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Status: RESOLVED → VERIFIED
Comment 10•13 years ago
|
||
Verified 03/30/2012. Works for me.
Updated•13 years ago
|
Whiteboard: [staging-fixed] → [production-affected]
You need to log in
before you can comment on or make changes to this bug.
Description
•