mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-26 04:54:10 +01:00
Set "Requires Authentication: Optional"
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
8ade27c301
commit
82d37d8e1a
|
|
@ -60,21 +60,22 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>Requires authentication:</th>
|
<th>Requires authentication:</th>
|
||||||
{{/*
|
{{/*
|
||||||
Authentication is optional if one of these is true:
|
Authentication is defined with the `security` key. We assume that the
|
||||||
- the security key is not set
|
key is not set if no authentication is necessary. If the key is set,
|
||||||
- the security value contains an empty object
|
authentication is required unless it contains an item that is an empty
|
||||||
|
object.
|
||||||
*/}}
|
*/}}
|
||||||
{{ $requires_authentication := 1 }}
|
{{ $requires_authentication := "Yes" }}
|
||||||
{{ if $operation_data.security }}
|
{{ if $operation_data.security }}
|
||||||
{{ range $operation_data.security }}
|
{{ range $operation_data.security }}
|
||||||
{{ if eq (len (index $operation_data.security 0)) 0 }}
|
{{ if eq (len (index $operation_data.security 0)) 0 }}
|
||||||
{{ $requires_authentication = 0 }}
|
{{ $requires_authentication = "Optional" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $requires_authentication = 0 }}
|
{{ $requires_authentication = "No" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<td>{{ if $requires_authentication }}Yes{{ else }}No{{ end }}</td>
|
<td>{{ $requires_authentication }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue