[w3c/permissions] Describe the permission store using constraints instead of a full model. (#96)

Here's a third attempt at modeling the permission store, as an alternative to #95, based on @raymeskhoury's suggestions.

This says that each realm has a permission store that's a set of entries for each capability, or a flag saying that capability is denied. The UA gets to ignore writes if it wants and can post tasks to update a realm's store when it ["receives new information about the user’s intent"](https://api.csswg.org/bikeshed/?url=https://raw.githubusercontent.com/jyasskin/permissions/set-permission-store/index.bs#relevant-permission-change), but each particular capability can add constraints on these updates.

Preview at https://api.csswg.org/bikeshed/?url=https://raw.githubusercontent.com/jyasskin/permissions/set-permission-store/index.bs#permission-stores

@alvestrand, this removes the "request a permission" entry point, because it's now straightforward to read and write the current permission store directly. We might want to add a "prompt the user to choose between several options" to match what you're using in [`getUserMedia()`](http://w3c.github.io/mediacapture-main/getusermedia.html#dom-mediadevices-getusermedia) step 7. The old algorithm didn't return a `MediaStream` anyway as step 8 expects. I think that should be a separate change.

@martinthomson @annevk

Fixes #84 and fixes #86.
You can view, comment on, or merge this pull request online at:

  https://github.com/w3c/permissions/pull/96

-- Commit Summary --

  * Start specifying the permission store as a loose set.
  * Describe a concrete permission store for each realm, and let the UA update it by queueing a task.
  * Fix some of Raymes' comments.
  * Update the rest of the spec for the new Permission Store arrangement.

-- File Changes --

    M index.bs (370)

-- Patch Links --

https://github.com/w3c/permissions/pull/96.patch
https://github.com/w3c/permissions/pull/96.diff

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/permissions/pull/96

Received on Wednesday, 11 May 2016 23:47:42 UTC