Skip to content

Commit 1011586

Browse files
tas50IanMadd
andauthoredFeb 28, 2020
Add new allowed_values field to resources (chef#2356)
* Add new allowed_values field to resources I realized in all our resource docs generation that we left out this pretty important value. Sometimes a resoruce takes symbols or strings, but it only takes a small list of them. If we don't provide that the user can't possible be successful. Signed-off-by: Tim Smith <[email protected]> * Put Allowed Values on its own line Signed-off-by: Tim Smith <[email protected]> Co-authored-by: Ian Maddaus <[email protected]>
1 parent f02f46f commit 1011586

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed
 

‎content/resources/windows_uac/_index.md

+3-8
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ menu:
1313
resource_reference: true
1414
robots: null
1515
resource_description_list:
16-
- markdown: 'The **windows_uac** resource configures UAC on Windows hosts by setting
17-
18-
registry keys at
19-
20-
''HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem'''
16+
- markdown: 'The **windows_uac** resource configures UAC on Windows hosts by setting registry keys at ''HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem'''
2117
resource_new_in: '15.0'
2218
handler_types: false
2319
syntax_description: "The windows_uac resource has the following syntax:\n\n``` ruby\n\
@@ -65,10 +61,9 @@ properties_list:
6561
required: false
6662
default_value: :prompt_for_creds
6763
new_in: null
64+
allowed_values: :auto_deny, :secure_prompt_for_creds, :prompt_for_creds
6865
description_list:
69-
- markdown: 'Behavior of the elevation prompt for standard users. Sets
70-
71-
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystemEnableLUAConsentPromptBehaviorUser.'
66+
- markdown: 'Behavior of the elevation prompt for standard users. Sets HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystemEnableLUAConsentPromptBehaviorUser.'
7267
- property: detect_installers
7368
ruby_type: true, false
7469
required: false

‎layouts/resources/list.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,8 @@ <h2 id = "properties">Properties</h2>
405405

406406
<dd>
407407
{{ if ne .ruby_type nil }}
408-
<strong>Ruby Type:</strong> {{ .ruby_type }} {{ if .default_value }}| <strong>Default Value:</strong> <code>{{ .default_value }}</code>{{ end }} {{ if .required }}| <code>REQUIRED</code>{{ end }}
408+
<strong>Ruby Type:</strong> {{ .ruby_type }} {{ if .default_value }}| <strong>Default Value:</strong> <code>{{ .default_value }}</code>{{ end }} {{ if .required }}| <code>REQUIRED</code>{{ end }}
409+
{{ if .allowed_values }}</br><strong>Allowed Values:</strong> <code>{{ .allowed_values }}</code>{{ end }}
409410
</p>
410411
{{ end }}
411412

‎layouts/resources/terms.html

+1
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,7 @@ <h2 id = "properties-{{ $PropertiesID.Get "Value" }}">Properties</h2>
735735
<dd>
736736
{{ if ne .ruby_type nil }}
737737
<strong>Ruby Type:</strong> {{ .ruby_type }} {{ if .default_value }}| <strong>Default Value:</strong> <code>{{ .default_value }}</code>{{ end }} {{ if .required }}| <code>REQUIRED</code>{{ end }}
738+
{{ if .allowed_values }}</br> <strong>Allowed Values:</strong> <code>{{ .allowed_values }}</code>{{ end }}
738739
</p>
739740
{{ end }}
740741

0 commit comments

Comments
 (0)
Please sign in to comment.