Closed
Bug 553092
Opened 15 years ago
Closed 15 years ago
Initialise the permissions manager
Categories
(Toolkit :: Add-ons Manager, defect, P2)
Toolkit
Add-ons Manager
Tracking
()
VERIFIED
FIXED
mozilla1.9.3a5
People
(Reporter: mossop, Assigned: mossop)
References
Details
(Whiteboard: [rewrite][mozmill-test-needed])
Attachments
(1 file)
12.53 KB,
patch
|
robert.strong.bugs
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Comment 1•15 years ago
|
||
Dave, can you please give a bit more details on that bug? Thanks.
Assignee | ||
Comment 2•15 years ago
|
||
The new code doesn't yet initialise the extension install whitelist
Comment 3•15 years ago
|
||
Dave, can we please get this bug fixed before our testday next Friday? It's a frustrating thing to always have to open the options dialog first, before you will be able to install any extension. I would like to see that we do not run into this problem during the testday.
Assignee | ||
Comment 4•15 years ago
|
||
Landed in http://hg.mozilla.org/projects/addonsmgr/rev/4ac299ae3dd0 and http://hg.mozilla.org/projects/addonsmgr/rev/7d4615d25f99
Status: NEW → ASSIGNED
Flags: in-testsuite+
Flags: in-litmus?
Whiteboard: [rewrite] → [rewrite][fixed-in-addonsmgr][needs-review]
Assignee | ||
Comment 5•15 years ago
|
||
This is a simple patch that just removes all the various places we currently initialize the permissions manager and just does it on startup whenever the app changes. This shouldn't be costly, the permissions manager is loaded on every startup anyway (by opening the hidden window) and keeping the initialisation all in one place makes far more sense.
Attachment #440859 -
Flags: review?(robert.bugzilla)
![]() |
||
Comment 6•15 years ago
|
||
Comment on attachment 440859 [details] [diff] [review]
patch rev 1
>diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
>--- a/browser/base/content/browser.js
>+++ b/browser/base/content/browser.js
>@@ -7570,33 +7570,16 @@ var LightWeightThemeWebInstaller = {
> gBrowser.tabContainer.removeEventListener("TabSelect", this, false);
>
> this._manager.resetPreview();
> },
>
> _isAllowed: function (node) {
> var pm = Services.perms;
>
>- var prefs = [["xpinstall.whitelist.add", pm.ALLOW_ACTION],
>- ["xpinstall.whitelist.add.36", pm.ALLOW_ACTION],
>- ["xpinstall.blacklist.add", pm.DENY_ACTION]];
>- prefs.forEach(function ([pref, permission]) {
>- try {
>- var hosts = gPrefService.getCharPref(pref);
>- } catch (e) {}
>-
>- if (hosts) {
>- hosts.split(",").forEach(function (host) {
>- pm.add(makeURI("http://" + host), "install", permission);
>- });
>-
>- gPrefService.setCharPref(pref, "");
>- }
>- });
>-
> var uri = node.ownerDocument.documentURIObject;
> return pm.testPermission(uri, "install") == pm.ALLOW_ACTION;
nit: just use Services.perms
Attachment #440859 -
Flags: review?(robert.bugzilla) → review+
![]() |
||
Updated•15 years ago
|
Whiteboard: [rewrite][fixed-in-addonsmgr][needs-review] → [rewrite][fixed-in-addonsmgr]
Assignee | ||
Updated•15 years ago
|
Whiteboard: [rewrite][fixed-in-addonsmgr] → [rewrite][fixed-in-addonsmgr][needs-landing]
Assignee | ||
Comment 7•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [rewrite][fixed-in-addonsmgr][needs-landing] → [rewrite]
Target Milestone: --- → mozilla1.9.3a5
Comment 8•15 years ago
|
||
Verified fixed with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a5pre) Gecko/20100514 Minefield/3.7a5pre.
Dave, I have one remaining question for the Litmus test. Before that patch went in the user always had to open the preferences dialog to initialize the permission manager, right? Also after a restart and not only for a fresh profile.
Status: RESOLVED → VERIFIED
Assignee | ||
Comment 9•15 years ago
|
||
This would have only affected fresh profiles and yes previously opening the permissions preferences would have initialized it.
Comment 10•15 years ago
|
||
(In reply to comment #9)
> This would have only affected fresh profiles and yes previously opening the
> permissions preferences would have initialized it.
So a test like the following would fulfill all needs?
1. Create a fresh profile
2. Open AMO and try to install extension X
As result the extension has to be installed.
Assignee | ||
Comment 11•15 years ago
|
||
As long as the install dialog appears and no notification bar then yes that is a pass.
Updated•14 years ago
|
Flags: in-litmus? → in-litmus?(vlad.maniac)
Comment 12•14 years ago
|
||
Litmus test has been added:
https://litmus.mozilla.org/show_test.cgi?id=15217
Such a test would be perfect for Mozmill. Adding whiteboard entry.
Flags: in-litmus?(vlad.maniac) → in-litmus+
Whiteboard: [rewrite] → [rewrite][mozmill-test-needed]
You need to log in
before you can comment on or make changes to this bug.
Description
•