summaryrefslogtreecommitdiffstats
path: root/lib/puppet/provider/macauthorization
diff options
context:
space:
mode:
authorNigel Kersten <nigelk@google.com>2009-07-06 14:55:52 -0700
committerJames Turnbull <james@lovedthanlost.net>2009-07-11 00:47:17 +1000
commit858d3334004bbcd642443a5de061b9733a8e765c (patch)
treea1bf222e653c333304d5e908a741651b6446af34 /lib/puppet/provider/macauthorization
parent44f127f738f6427bdf2adbe1d06d57b7b62e715e (diff)
downloadpuppet-858d3334004bbcd642443a5de061b9733a8e765c.tar.gz
puppet-858d3334004bbcd642443a5de061b9733a8e765c.tar.xz
puppet-858d3334004bbcd642443a5de061b9733a8e765c.zip
Fixes #2258,#2257,#2256. Maintain correct type for integers/booleans, allow correct values, and fix rule array handling
Diffstat (limited to 'lib/puppet/provider/macauthorization')
-rw-r--r--lib/puppet/provider/macauthorization/macauthorization.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/puppet/provider/macauthorization/macauthorization.rb b/lib/puppet/provider/macauthorization/macauthorization.rb
index 58f12b94c..0c7a9a633 100644
--- a/lib/puppet/provider/macauthorization/macauthorization.rb
+++ b/lib/puppet/provider/macauthorization/macauthorization.rb
@@ -258,9 +258,9 @@ Puppet::Type.type(:macauthorization).provide :macauthorization, :parent => Puppe
value = self.class.parsed_auth_db[resource_name][native_attribute]
case value
when true, "true", :true
- value = :true
+ value = true
when false, "false", :false
- value = :false
+ value = false
end
@property_hash[attribute] = value
@@ -287,7 +287,14 @@ Puppet::Type.type(:macauthorization).provide :macauthorization, :parent => Puppe
end
define_method(field.to_s + "=") do |value|
- @property_hash[field] = value
+ case value
+ when true, "true", :true
+ @property_hash[field] = true
+ when false, "false", :false
+ @property_hash[field] = false
+ else
+ @property_hash[field] = value
+ end
end
end