diff options
author | Tim Smith <tsmith@chef.io> | 2021-09-01 14:49:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-01 14:49:39 -0700 |
commit | dc68557a32d5a1f89c4d45a1ba580da91d1abf06 (patch) | |
tree | c1ec4f764824f789aaf7e526b2ffc6dcea9f2a4f | |
parent | e83cc918bc2f2ab2b4e33ab61e8b2d21d5fd8e7a (diff) | |
parent | b7aed99581df715dbdcbedeef94de2851c7cf607 (diff) | |
download | chef-dc68557a32d5a1f89c4d45a1ba580da91d1abf06.tar.gz |
Merge pull request #11987 from chef/fix-windows-user-account-control-registry-values
windows_uac: fix registry settings for consent_behavior_users
-rw-r--r-- | lib/chef/resource/windows_uac.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/resource/windows_uac.rb b/lib/chef/resource/windows_uac.rb index 330a6432bc..4f01b542a5 100644 --- a/lib/chef/resource/windows_uac.rb +++ b/lib/chef/resource/windows_uac.rb @@ -104,7 +104,9 @@ class Chef # # @return [Integer] def consent_behavior_users_symbol_to_reg(sym) - %i{auto_deny secure_prompt_for_creds prompt_for_creds}.index(sym) + # Since 2 isn't a valid value for ConsentPromptBehaviorUser, assign the value at index as nil. + # https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/user-account-control-group-policy-and-registry-key-settings#registry-key-settings + [:auto_deny, :secure_prompt_for_creds, nil, :prompt_for_creds].index(sym) end end end |