Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for permissions that have an associated Feature Policy #163

Merged
merged 2 commits into from Sep 7, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 20 additions & 7 deletions index.bs
Expand Up @@ -44,6 +44,11 @@ spec: sensors; urlPrefix: https://w3c.github.io/sensors/#
spec: manifest; urlPrefix: https://w3c.github.io/manifest/#
type: dfn
text: install; url: dfn-install
spec: feature-policy; urlPrefix: https://wicg.github.io/feature-policy/#
type: dfn
text: policy-controlled feature
raymeskhoury marked this conversation as resolved.
Show resolved Hide resolved
type: dfn
text: feature name
raymeskhoury marked this conversation as resolved.
Show resolved Hide resolved

</pre>
<pre class="link-defaults">
Expand Down Expand Up @@ -233,6 +238,21 @@ spec: webidl
and <code>|descriptor|.{{PermissionDescriptor/name}}</code> isn't
<a>allowed in non-secure contexts</a>, then return {{"denied"}}.
</li>
<li>
If there exists a <a>policy-controlled feature</a> with a
<a>feature name</a> that is equal to
<code>|descriptor|.{{PermissionDescriptor/name}}</code> and
|settings| has an <a>associated `Document`</a> named <var>document</var>,
run the following step:
<ol class="algorithm">
<li>
If <var>document</var> is not <a>allowed to use</a> the feature
with the <a>feature name</a>
<code>|descriptor|.{{PermissionDescriptor/name}}</code>
return {{"denied"}}.
</li>
</ol>
</li>
<li>
If there was a previous invocation of this algorithm with the same
|descriptor| and |settings|, returning
Expand Down Expand Up @@ -786,13 +806,6 @@ spec: webidl
<a>allowed in non-secure contexts</a>. {{"camera"}} and {{"microphone"}}
MAY be <a>allowed in non-secure contexts</a>.
</p>
<p>
If the <a>current global object</a> has an <a>associated `Document`</a>,
and that {{Document}} is not <a>allowed to use</a> the feature indicated
by attribute name <{iframe/allowusermedia}>, then the <a>permission
state</a> of any descriptor with a {{PermissionDescriptor/name}} of
{{"camera"}} or {{"microphone"}} must be {{"denied"}}.
</p>
<dl>
<dt>
<a>permission descriptor type</a>
Expand Down