Re: [w3c/permissions] Allow Permissions Policy-based permission models (#185)

This seems overtaken by events: "realm" isn't mentioned anymore.

Unlike 6 years ago, keying permissions off the top-level origin seems the norm now, even captured in the [default permission key generation algorithm](https://w3c.github.io/permissions/#dfn-default-permission-key-generation-algorithm): _"1. Return settings's [top-level origin](https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-top-level-origin)."_

The only remaining nit might be [request permission to use](https://w3c.github.io/permissions/#dfn-request-permission-to-use) seems to require a bit of reading ahead to discover this: _"_

4. _If the user gives [express permission](https://w3c.github.io/permissions/#dfn-express-permission) to use the powerful feature, set current state to "[granted](https://w3c.github.io/permissions/#dom-permissionstate-granted)"; otherwise to "[denied](https://w3c.github.io/permissions/#dom-permissionstate-denied)". The user's interaction may provide [new information about the user's intent](https://w3c.github.io/permissions/#dfn-new-information-about-the-user-s-intent) for the [origin](https://html.spec.whatwg.org/multipage/browsers.html#concept-origin)._

5. _Let key be the result of [generating a permission key](https://w3c.github.io/permissions/#dfn-permission-key-generation-algorithm) with the [current settings object](https://html.spec.whatwg.org/multipage/webappapis.html#current-settings-object)."_

Step 4 talks about UX centered around an "origin", but we have to dive into step 5 to learn the invariant we need "new information" about might be the top-level origin (by default), which seems relevant to UX.

That said, I can't think of a better way to write this, so maybe this is clear enough?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/permissions/issues/185#issuecomment-2557304591
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/permissions/issues/185/2557304591@github.com>

Received on Friday, 20 December 2024 16:17:59 UTC