Closed Bug 809944 Opened 13 years ago Closed 13 years ago

Require access fields in manifests.

Categories

(Core :: DOM: Device Interfaces, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20
blocking-basecamp +
Tracking Status
firefox18 --- fixed
firefox19 --- fixed
firefox20 --- fixed

People

(Reporter: gwagner, Assigned: gwagner)

References

Details

(Whiteboard: [qa-])

Attachments

(2 files, 3 obsolete files)

We don't want to grant base permissions for settings and contacts and use the access fields in the manifest files.
blocking-basecamp: --- → ?
Attached patch patch (obsolete) — Splinter Review
Attached patch patchSplinter Review
Attachment #679735 - Attachment is obsolete: true
Attachment #679881 - Flags: review?(bent.mozilla)
Depends on: 810126
Comment on attachment 679881 [details] [diff] [review] patch Review of attachment 679881 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me!
Attachment #679881 - Flags: review?(bent.mozilla) → review+
Depends on: 810427
blocking-basecamp: ? → +
Depends on: 811923
Attached patch fix Tests (obsolete) — Splinter Review
Attachment #681790 - Flags: review?(ddahl)
Blocks: 812034
Comment on attachment 681790 [details] [diff] [review] fix Tests Hm it seems that we need access fields here. Will fix it tomorrow.
Attachment #681790 - Flags: review?(ddahl)
Attached patch patch (obsolete) — Splinter Review
Cu.reportError doesn't show up in logcat so I added dump as well.
Attachment #681790 - Attachment is obsolete: true
Attached patch testsSplinter Review
Attachment #682127 - Attachment is obsolete: true
Attachment #682184 - Flags: review?(ddahl)
Comment on attachment 682184 [details] [diff] [review] tests Review of attachment 682184 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. ::: dom/apps/src/PermissionsInstaller.jsm @@ +287,5 @@ > aAccess && !tableEntry.access) { > Cu.reportError("PermissionsTable.jsm: expandPermissions: Invalid Manifest : " + > aPermName + " " + aAccess + "\n"); > + dump("PermissionsTable.jsm: expandPermissions: Invalid Manifest: " + > + aPermName + " " + aAccess + "\n"); I thought we wanted to throw here in case the manifest is invalid? Has that thinking changed? ::: dom/tests/browser/browser_webapps_permissions.js @@ +29,5 @@ > "alarms": "allow", > + "contacts-write": "prompt", > + "contacts-read": "prompt", > + "device-storage:apps-read": "prompt", > + "device-stroage:apps-write": "unknown" nit: spelling "device-storage:apps-write" @@ +69,5 @@ > var nav = XPCNativeWrapper.unwrap(browser.contentWindow.navigator); > ok(nav.mozApps, "we have a mozApps property"); > var navMozPerms = nav.mozPermissionSettings; > ok(navMozPerms, "mozPermissions is available"); > + Thanks! that was some flotsom and jetsom from me!
Attachment #682184 - Flags: review?(ddahl) → review+
(In reply to David Dahl :ddahl from comment #8) > Comment on attachment 682184 [details] [diff] [review] > tests > > Review of attachment 682184 [details] [diff] [review]: > ----------------------------------------------------------------- > > Looks good. > > ::: dom/apps/src/PermissionsInstaller.jsm > @@ +287,5 @@ > > aAccess && !tableEntry.access) { > > Cu.reportError("PermissionsTable.jsm: expandPermissions: Invalid Manifest : " + > > aPermName + " " + aAccess + "\n"); > > + dump("PermissionsTable.jsm: expandPermissions: Invalid Manifest: " + > > + aPermName + " " + aAccess + "\n"); > > I thought we wanted to throw here in case the manifest is invalid? Has that > thinking changed? > The problem is following test: // test unknown permission { permission: UNKNOWN, access: READWRITE, expected: [] } We throw and never return an empty array.
Oh ignore my last comment. The real problem is the access field for storage: // test substitute { permission: "storage", access: READWRITE, expected: ["indexedDB-unlimited", "offline-app", "pin-app"] }, I will remove the access field and keep the throw.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: