class Chef::Resource::WindowsUac
Public Instance Methods
Source
# File lib/chef/resource/windows_uac.rb, line 91 def bool_to_reg(bool) bool ? 1 : 0 end
converts a Ruby
true/false to a 1 or 0
@return [Integer] 1:true, 0: false
Source
# File lib/chef/resource/windows_uac.rb, line 98 def consent_behavior_admins_symbol_to_reg(sym) %i{no_prompt secure_prompt_for_creds secure_prompt_for_consent prompt_for_creds prompt_for_consent prompt_for_consent_non_windows_binaries}.index(sym) end
converts the symbols we use in the consent_behavior_admins property into numbers 0-5 based on their array index
@return [Integer]
Source
# File lib/chef/resource/windows_uac.rb, line 105 def consent_behavior_users_symbol_to_reg(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
converts the symbols we use in the consent_behavior_users property into numbers 0-2 based on their array index
@return [Integer]