summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-08-19 17:04:20 -0700
committerJames Turnbull <james@lovedthanlost.net>2009-08-24 11:36:21 +1000
commit5ee660276f3e4f6519b1257673fa690be0416fbd (patch)
tree6336a07820f0623afc6a463d7c875f5808d9b4ce /lib
parent06fcece75ef52168a73013eba2b8bfc50cf71c97 (diff)
downloadpuppet-5ee660276f3e4f6519b1257673fa690be0416fbd.tar.gz
puppet-5ee660276f3e4f6519b1257673fa690be0416fbd.tar.xz
puppet-5ee660276f3e4f6519b1257673fa690be0416fbd.zip
Adding an 'exists?' delegator from user type to provider
We need this knowledge from the Settings class, and it makes more sense to delegate than to use direct access to the provider. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/puppet/type/user.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb
index 28b1631cb..2b082ee94 100755
--- a/lib/puppet/type/user.rb
+++ b/lib/puppet/type/user.rb
@@ -245,6 +245,11 @@ module Puppet
autos
end
+ # Provide an external hook. Yay breaking out of APIs.
+ def exists?
+ provider.exists?
+ end
+
def retrieve
absent = false
properties().inject({}) { |prophash, property|