summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2021-02-04 14:31:09 -0800
committerTim Smith <tsmith84@gmail.com>2021-02-04 14:31:09 -0800
commit595e16467219d4caefe26fd976c3d046162ad700 (patch)
tree2e23adaf6c85d225c0b5cd402efa81bd646c634c /lib/chef
parentb738b731fd5a2264e1ee5c03f9c27e9de6d0f0e7 (diff)
downloadchef-595e16467219d4caefe26fd976c3d046162ad700.tar.gz
Improve auto-generated documentation
Skip sensitive properties in the docs pages since there are already in the common docs pages Start using action descriptions Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/resource/windows_uac.rb2
-rw-r--r--lib/chef/resource/windows_user_privilege.rb8
-rw-r--r--lib/chef/resource/windows_workgroup.rb3
3 files changed, 6 insertions, 7 deletions
diff --git a/lib/chef/resource/windows_uac.rb b/lib/chef/resource/windows_uac.rb
index db5d5fd173..23a5e4fc28 100644
--- a/lib/chef/resource/windows_uac.rb
+++ b/lib/chef/resource/windows_uac.rb
@@ -72,7 +72,7 @@ class Chef
equal_to: %i{auto_deny secure_prompt_for_creds prompt_for_creds},
default: :prompt_for_creds
- action :configure do
+ action :configure, description: "Configures UAC by setting registry keys at `HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System`" do
description 'Configures UAC by setting registry keys at \'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\''
registry_key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' do
diff --git a/lib/chef/resource/windows_user_privilege.rb b/lib/chef/resource/windows_user_privilege.rb
index 971338303d..cd106ab58b 100644
--- a/lib/chef/resource/windows_user_privilege.rb
+++ b/lib/chef/resource/windows_user_privilege.rb
@@ -147,7 +147,7 @@ class Chef
end
end
- action :add do
+ action :add, description: "Add a user privilege" do
([*new_resource.privilege] - [*current_resource.privilege]).each do |user_right|
converge_by("adding user '#{new_resource.principal}' privilege #{user_right}") do
Chef::ReservedNames::Win32::Security.add_account_right(new_resource.principal, user_right)
@@ -155,7 +155,7 @@ class Chef
end
end
- action :set do
+ action :set, description: "Set the privileges that are listed in the `privilege` property for only the users listed in the `users` property" do
if new_resource.users.nil? || new_resource.users.empty?
raise Chef::Exceptions::ValidationFailed, "Users are required property with set action."
end
@@ -190,7 +190,7 @@ class Chef
end
end
- action :clear do
+ action :clear, description: "Clear all user privileges" do
new_resource.privilege.each do |privilege|
accounts = Chef::ReservedNames::Win32::Security.get_account_with_user_rights(privilege)
@@ -204,7 +204,7 @@ class Chef
end
end
- action :remove do
+ action :remove, description: "Remove a user privilege" do
curr_res_privilege = current_resource.privilege
missing_res_privileges = (new_resource.privilege - curr_res_privilege)
diff --git a/lib/chef/resource/windows_workgroup.rb b/lib/chef/resource/windows_workgroup.rb
index 3c49f7cb3e..f5bd0e91fc 100644
--- a/lib/chef/resource/windows_workgroup.rb
+++ b/lib/chef/resource/windows_workgroup.rb
@@ -87,8 +87,7 @@ class Chef
property :sensitive, [TrueClass, FalseClass],
default: true, desired_state: false
- action :join do
- description "Update the workgroup."
+ action :join, description: "Update the workgroup." do
unless workgroup_member?
converge_by("join workstation workgroup #{new_resource.workgroup_name}") do