From d1d54fcc8c46ab58988a481d85f762f69e5b90c6 Mon Sep 17 00:00:00 2001 From: Johann Hofmann Date: Mon, 18 Jul 2022 18:25:16 +0000 Subject: [PATCH] Change permission policy feature name to "storage-access" (fixes #104) This was discussed before in #12 and there was some valid concern around the "storage-access" name based on the fact that this PP feature is more focused on "requesting" storage access, and there is no delegation mechanism like with other permissions that would make it semantically consistent. However, I think that in light of #32 and the possibility of integrating with the permissions API (giving us important functionality such as observing when storage access is granted) it seems more useful to be consistent with the (future) permission name and call both "storage-access". --- storage-access.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage-access.bs b/storage-access.bs index bf1ffa6..0e73851 100644 --- a/storage-access.bs +++ b/storage-access.bs @@ -200,7 +200,7 @@ When invoked on {{Document}} |doc|, the re 1. Let |p| be [=a new promise=]. 1. If this algorithm was invoked when |doc|'s {{Window}} object did not have [=transient activation=], [=reject=] and return |p|. 1. If |doc|'s [=Document/browsing context=] is a [=top-level browsing context=], [=/resolve=] and return |p|. -1. If |doc| is not [=allowed to use=] the `"request-storage-access"` permission, [=reject=] and return |p|. +1. If |doc| is not [=allowed to use=] the `"storage-access"` permission, [=reject=] and return |p|. 1. If the [=top-level origin=] of |doc|'s [=relevant settings object=] is an [=opaque origin=], [=reject=] and return |p|. 1. If |doc|'s [=Document/origin=] is [=same origin=] with the [=top-level origin=] of |doc|'s [=relevant settings object=], [=/resolve=] and return |p|. 1. If |doc|'s [=Document/origin=] is an [=opaque origin=], [=reject=] and return |p|. @@ -297,7 +297,7 @@ To the [=parse a sandboxing directive=] algorithm, add the following under step

Permissions Policy Integration

-The Storage Access API defines a [=policy-controlled feature=] identified by the string `"request-storage-access"`. Its [=default allowlist=] is `"*"`. +The Storage Access API defines a [=policy-controlled feature=] identified by the string `"storage-access"`. Its [=default allowlist=] is `"*"`. Note: A {{Document}}’s [=Document/permissions policy=] determines whether any content in that document is allowed to request storage access using {{Document/requestStorageAccess()}}. If disabled in any document, calling {{Document/requestStorageAccess()}} in that document will reject.