diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-18 17:48:10 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-18 17:48:10 +0000 |
| commit | 93771b7935e544630c3416fda928a3820c615df2 (patch) | |
| tree | 0be17fe9135646fc6f64c8c635342bc87ae8f714 /lib/puppet | |
| parent | 738698c34bf20ae534c37e7304033344fefa4bdf (diff) | |
| download | puppet-93771b7935e544630c3416fda928a3820c615df2.tar.gz puppet-93771b7935e544630c3416fda928a3820c615df2.tar.xz puppet-93771b7935e544630c3416fda928a3820c615df2.zip | |
fixing user[:groups] management when the user is absent
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1211 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
| -rwxr-xr-x | lib/puppet/type/user.rb | 19 |
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 |
