Skip to content

Commit

Permalink
[webappsec-permissions] Define restrictions on "device-info" permissi…
Browse files Browse the repository at this point in the history
…on (from TPAC). w3c/permissions@e3ba650
  • Loading branch information
triple-underscore committed Jun 26, 2017
1 parent af096a0 commit 0687b77
Showing 1 changed file with 89 additions and 33 deletions.
122 changes: 89 additions & 33 deletions webappsec-permissions-ja.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@
相互作用-:interact:やりとり
暫定的:provisional:~
feedback::::フィードバック
違反-:violate:~

させる:lead
したがって:thus
Expand All @@ -292,6 +293,7 @@

●IDL/event/処理
設定-:set:~
再設定-:reset:~
失敗-:fail:~
発火-:fire::~
変換-:convert:~
Expand Down Expand Up @@ -430,12 +432,11 @@
反映-:reflect:~
受取っ:receive :受け取っ
-:include:~
-:present:~
在る:present/exist
増やす:increase する
変化:changes:~
変化-:change:~
変更-:change:~
在る:exist:~
収集-:collect:~
呈示-:present:~
更新-:update:~
Expand Down Expand Up @@ -486,6 +487,9 @@
順序:order:~
半順序:partial order:~
log::::ログ
閲覧文脈:browsing context:~
focus::::フォーカス

~記述子:rootDesc
前回~結果:previousResult
有型~記述子:typedDescriptor
Expand Down Expand Up @@ -577,8 +581,10 @@
pN.speaker:#dom-permissionname-speaker
pN.device-info:#dom-permissionname-device-info
pN.background-sync:#dom-permissionname-background-sync
pN.bluetooth:https://webbluetoothcg.github.io/web-bluetooth/#dom-permissionname-bluetooth
pN.persistent-storage:storage-ja.html#dom-permissionname-persistent-storage
pN.bluetooth:#dom-permissionname-bluetooth
*https://webbluetoothcg.github.io/web-bluetooth/#dom-permissionname-bluetooth
pN.persistent-storage:#dom-permissionname-persistent-storage
*storage-ja.html#dom-permissionname-persistent-storage
https://storage.spec.whatwg.org/#dom-permissionname-persistent-storage
pN.ambient-light-sensor:#dom-permissionname-ambient-light-sensor
pN.accelerometer:#dom-permissionname-accelerometer
Expand Down Expand Up @@ -627,10 +633,11 @@
sl.query:#dom-permissionstatus-query-slot
a.allowusermedia:~HEembed#attr-iframe-allowusermedia
c.deviceId:https://w3c.github.io/mediacapture-main/#deviceid
et.devicechange:https://w3c.github.io/mediacapture-main/#devicechange

●用語
適切な記述子~型の値に変換-:#_convert-object-to-descriptor-value
汎用~sensor許可~破棄~algo:#_generic-sensor-permission-revocation-algorithm
汎用~sensor許可~破棄~algo:https://w3c.github.io/sensors/#generic-sensor-permission-revocation-algorithm

Examples~section:#examples
~PermissionStatus更新~手続き:#PermissionStatus-update
Expand Down Expand Up @@ -751,7 +758,7 @@ <h1>Permissions 日本語訳</h1>
</p>

<p >
更新:<time>2017-04-19</time>
更新:<time>2017-06-26</time>
(公開:<time>2017-03-14</time>
</p>

Expand All @@ -775,7 +782,7 @@ <h1>Permissions 日本語訳</h1>
<a href="http://www.w3.org/" id="_W3C">W3C</a>
<hgroup>
<h1 id="title">Permissions</h1>
<h2 id="subtitle">2017 年 419 日付 編集者草案</h2>
<h2 id="subtitle">2017 年 623 日付 編集者草案</h2>
</hgroup>

<dl id="_versions">
Expand Down Expand Up @@ -1461,6 +1468,9 @@ <h2 title="Status of a permission">6. 許可の状態0</h2>
<dl class="idl-def">
<dt>`granted@pS</dt>
<dd>
“是認されている”
</dd>
<dd>
この状態は、[
~UAが許可を利用者に訊ねることなく,~call元が成功裡に当の特色機能に~accessできる
]ことを表現する。
Expand All @@ -1470,6 +1480,9 @@ <h2 title="Status of a permission">6. 許可の状態0</h2>

<dt>`denied@pS</dt>
<dd>
“否認されている”
</dd>
<dd>
この状態は、[
~call元は,当の特色機能に~accessできない
]ことを表現する。
Expand Down Expand Up @@ -1919,8 +1932,8 @@ <h2 title="Permission Registry">10. 許可~registry</h2>
`speaker$pN,
`device-info$pN,
`background-sync$pN,
`bluetooth$pN,
`persistent-storage$pN,
`bluetooth@pN,
`persistent-storage@pN,
`ambient-light-sensor$pN,
`accelerometer$pN,
`gyroscope$pN,
Expand All @@ -1931,7 +1944,7 @@ <h2 title="Permission Registry">10. 許可~registry</h2>

<p class="note">注記:
列挙~値[
`accelerometer^pN, `gyroscope^pN, `magnetometer^pN
`accelerometer$pN, `gyroscope$pN, `magnetometer$pN
]は、暫定的であり,早期の実装からの~feedbackに基づいて変更され得る。
更なる情報は
<a href="https://github.com/w3c/sensors/issues/22">w3c/sensors#22</a>
Expand Down Expand Up @@ -2140,6 +2153,7 @@ <h2 title="Permission Registry">10. 許可~registry</h2>
— その際には、~promptが必要とされるなら利用者にそれを示し,後者の引数を結果に合致するように更新する。
要請が例外的に失敗し得る場合、例外が投出されても~MAY(単に許可が否認されているだけでは、例外的とはされない)。
`Permissions$I の `request()$m ~methodにて利用される。
</p>
Takes an instance of the permission descriptor type and a newly-created instance of the permission result type. Uses the algorithms in §5.2 Requesting more permission to show the user any necessary prompt to try to increase permissions, and updates the instance permission result type to match. May throw an exception if the request can fail exceptionally. (Merely being denied permission is not exceptional.) Used by Permissions' request() method. If unspecified, this defaults to the boolean permission request algorithm.
</dd>
Expand Down Expand Up @@ -2360,7 +2374,7 @@ <h3 title="Media Devices">10.5. 各種~media機器</h3>
結果が `denied$pS ならば ~cameraに対し `getUserMedia()^m で要請しても成功しないことが~~判明することになる。
</li>
<li>
~accessに対する許可~状態が一部の~cameraのみに在する場合
~accessに対する許可~状態が一部の~cameraのみに在る場合
`prompt$pS が返されることになる。
</li>
</ul>
Expand Down Expand Up @@ -2403,12 +2417,15 @@ <h3 title="Media Devices">10.5. 各種~media機器</h3>
</p>
<ol>
<li>
<p>
~IF[
`~extra許可~data$内に %許可~記述子 の `deviceId^m は在る
%状態0 の `state$m ~SET %許可~記述子 に対する`許可~状態$;<br>
~RET
]:
</p>

<ol ><li>%状態0 の `state$m ~SET %許可~記述子 に対する`許可~状態$
</li><li>~RET
</li></ol>
If permissionDesc.deviceId exists in the extra permission data, set status.state to permissionDesc’s permission state and terminate these steps.
</li>
Expand All @@ -2418,7 +2435,7 @@ <h3 title="Media Devices">10.5. 各種~media機器</h3>
Let global be a copy of permissionDesc with the deviceId member removed.
</li>
<li>
%状態0 の `state$m ~SET %大域~記述子 に対する`許可~状態$
%状態0 の `state$m ~SET %大域~記述子 に対する`許可~状態$
Set status.state to global’s permission state.
</li>
Expand All @@ -2431,11 +2448,47 @@ <h3 title="Media Devices">10.5. 各種~media機器</h3>
permission request algorithm
</dt>
<dd>
`真偽~許可を要請する$
`これは既定なので、この項目は冗長。^tnote
<p>
次の手続きを走らす:
Run the boolean permission request algorithm
</dd>
The permission request algorithm runs the following steps:
</p>
<ol>
<li>
`真偽~許可を要請する$( %許可~記述子, %状態0 )
Let result be the result of running the boolean permission request algorithm.
</li>
<li>
%結果 ~LET %状態0 の `state$m
</li>
<li>
~IF[
%結果 ~EQ `granted$pS
この`~realm$に対する `device-info$pN 許可を `granted$pS に設定する
If result is "granted", the UA MUST set the "device-info" permission to "granted" for this realm.
</li>
<li>
前~段に違反しない限り、~UAは
%結果 を[[
この`~realm$ / `同一生成元$に属する他の`~realm$
]に対する `device-info$pN 許可
]に関する,`利用者の意向についての新たな情報$として扱っても~MAY
The UA MAY treat result as new information about the user’s intent with respect to the "device-info" permission for this realm and other realms with the same origin, provided it doesn’t violate the previous step.
</li>
<li>
~RET %結果
Return result.
</li>
</ol>
</dd>

<dt>
`許可~破棄~algo$
Expand All @@ -2453,13 +2506,23 @@ <h3 title="Media Devices">10.5. 各種~media機器</h3>

</dl>

<div class="p">
<p>
`device-info@pN
で`識別される特色機能$に対する許可は、入力/出力~機器の名前と能力への~accessを制御する。
The "device-info" permission controls access to names and capabilities of input and output devices.
で`識別される特色機能$に対する許可は、次を制御する:
</p>

<ul ><li>`deviceId$c に結付けられた名前と能力への~access
</li><li>現在の閲覧文脈が~focusされていないときに `devicechange$et ~eventが発火されるかどうか
</li></ul>

<p>
`device-info$pN 許可は、生成元に対する `deviceId$c が再設定されたときには破棄され~MUST。
</p>
The "device-info" permission controls access to the name and capabilities associated with a deviceId, as well as whether devicechange events fire when the current browsing context is not in focus. The "device-info" permission MUST be revoked when deviceIds for an origin are reset.
</div>


</section>
<section id="background-sync">
Expand Down Expand Up @@ -2494,11 +2557,6 @@ <h3 title="Ambient Light Sensor">10.7. 環境光~sensor~API( `ambient-light-se
Its permission revocation algorithm is the result of calling generic sensor permission revocation algorithm passing it "ambient-light-sensor" as argument.
</p>

<p class="trans-note">
`汎用~sensor許可~破棄~algo@
( generic sensor permission revocation algorithm )は、まだ策定されていないか,参照先不明。
</p>


</section>
<section id="accelerometer">
Expand Down Expand Up @@ -2763,14 +2821,10 @@ <h3 title="Normative References">文献(規範)</h3>
S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. March 1997. Best Current Practice. URL: https://tools.ietf.org/html/rfc2119
[SECURE-CONTEXTS]
Mike West. Secure Contexts. URL: https://www.w3.org/TR/secure-contexts/
[STORAGE]
Anne van Kesteren. Storage Standard. Living Standard. URL: https://storage.spec.whatwg.org/
[UIEVENTS]
Gary Kacmarcik; Travis Leithead. UI Events. URL: https://www.w3.org/TR/uievents/
[WEB-BLUETOOTH]
Jeffrey Yasskin. Web Bluetooth. URL: https://webbluetoothcg.github.io/web-bluetooth/
[WebIDL]
Cameron McCormack; Boris Zbarsky; Tobie Langel. Web IDL. URL: https://www.w3.org/TR/WebIDL-1/
Cameron McCormack; Boris Zbarsky; Tobie Langel. Web IDL. URL: https://heycam.github.io/webidl/
</script>

</section>
Expand Down Expand Up @@ -2800,6 +2854,8 @@ <h3 title="Informative References">文献(参考)</h3>
Peter Beverloo; et al. Push API. URL: https://www.w3.org/TR/push-api/
[WEB-BACKGROUND-SYNC]
Web Background Synchronization specification draft. Living Standard. URL: https://wicg.github.io/BackgroundSync/spec/
[WEB-BLUETOOTH]
Jeffrey Yasskin. Web Bluetooth. URL: https://webbluetoothcg.github.io/web-bluetooth/
[WEBMIDI]
Chris Wilson; Jussi Kalliokoski. Web MIDI API. URL: https://www.w3.org/TR/webmidi/
</script>
Expand Down

0 comments on commit 0687b77

Please sign in to comment.