Bug 823397 - Installing a privileged app from marketplace dev - appStatus should be privileged, but ends up being web. r=fabrice
authorGregor Wagner <anygregor@gmail.com>
Thu, 20 Dec 2012 10:52:33 -0800
changeset 125789 8e0e2caa7d00f2aac2752c8e1ac9676244814e14
parent 125788 ee099414c986dae1b2677f709f6fb9c37cab956b
child 125790 6e6b0872190b029e5010431fe2bd4c6d1f543212
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice
bugs823397
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 823397 - Installing a privileged app from marketplace dev - appStatus should be privileged, but ends up being web. r=fabrice
dom/apps/src/Webapps.jsm
--- a/dom/apps/src/Webapps.jsm
+++ b/dom/apps/src/Webapps.jsm
@@ -1869,19 +1869,20 @@ this.DOMApplicationRegistry = {
                 throw "INSTALL_FROM_DENIED";
               }
 
               let isDevMode = Services.prefs.getBoolPref("dom.mozApps.dev_mode");
               let maxStatus = isDevMode ? Ci.nsIPrincipal.APP_STATUS_CERTIFIED
                             : isSigned  ? Ci.nsIPrincipal.APP_STATUS_PRIVILEGED
                                         : Ci.nsIPrincipal.APP_STATUS_INSTALLED;
 
-              if (AppsUtils.getAppManifestStatus(aManifest) > maxStatus) {
+              if (AppsUtils.getAppManifestStatus(manifest) > maxStatus) {
                 throw "INVALID_SECURITY_LEVEL";
               }
+              aApp.appStatus = AppsUtils.getAppManifestStatus(manifest);
 
               if (aOnSuccess) {
                 aOnSuccess(id, manifest);
               }
               delete self.downloads[aApp.manifestURL];
             } catch (e) {
               // Something bad happened when reading the package.
               if (typeof e == 'object') {