diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-21 15:47:27 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-21 15:47:27 +0000 |
| commit | 2b27289b599047335fb2d63c6f2248125c74aae9 (patch) | |
| tree | 4be4bfc4e6b0cc821235771e08641df69d1d35c2 /lib | |
| parent | 0870c5c910271bd7b915ecd566721e8077a11bd4 (diff) | |
Fixing #293, I think. The problem was that the groups state was not correctly passing strings in all cases, which caused some very strange problems internally.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1640 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
| -rwxr-xr-x | lib/puppet/type/user.rb | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb index 8905b8d1d..ac6ce461d 100755 --- a/lib/puppet/type/user.rb +++ b/lib/puppet/type/user.rb @@ -187,7 +187,7 @@ module Puppet specified as an array." def should_to_s - self.should.join(",") + self.should end def is_to_s @@ -204,13 +204,13 @@ module Puppet @should ||= [] if @parent[:membership] == :inclusive - @should.sort + return @should.sort.join(",") else members = @should if @is.is_a?(Array) members += @is end - members.uniq.sort + return members.uniq.sort.join(",") end end @@ -229,10 +229,12 @@ module Puppet unless defined? @is and @is return false end - unless @is.class == @should.class - return false + tmp = @is + if @is.is_a? Array + tmp = @is.sort.join(",") end - return @is.sort == @should.sort + + return tmp == self.should end validate do |value| @@ -240,11 +242,6 @@ module Puppet raise ArgumentError, "Group names must be provided, not numbers" end end - - def sync - provider.groups = self.should.join(",") - :user_changed - end end # these three states are all implemented differently on each platform, @@ -338,7 +335,7 @@ module Puppet } end - if @states.include?(:groups) and groups = @states[:groups].should + if @states.include?(:groups) and groups = @states[:groups].should.split(",") autos += groups end |
