summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rwxr-xr-xlib/puppet/type/user.rb19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb
index d1d2a6896..81f82f27d 100755
--- a/lib/puppet/type/user.rb
+++ b/lib/puppet/type/user.rb
@@ -246,7 +246,12 @@ module Puppet
if @parent[:membership] == :inclusive
@should.sort.join(",")
else
- (@is + @should).uniq.sort.join(",")
+ members = @should
+ if @is.is_a?(Array)
+ members += @is
+ end
+ members.uniq.sort.join(",")
+ #(@is + @should).uniq.sort.join(",")
end
end
@@ -261,6 +266,9 @@ module Puppet
unless defined? @is and @is
return false
end
+ unless @is.class == @should.class
+ return false
+ end
return @is.sort == @should.sort
end
@@ -272,16 +280,9 @@ module Puppet
def sync
if respond_to? :setgrouplist
- groups = nil
- if @parent[:membership] == :inclusive
- groups = @should
- else
- groups = (@is + @should).uniq
- end
-
# Pass them the group list, so that the :membership logic
# is all in this class, not in parent classes.
- setgrouplist(groups)
+ setgrouplist(self.should)
return :user_modified
else
super