diff options
author | John Keiser <jkeiser@opscode.com> | 2014-08-22 09:19:30 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2014-08-22 09:20:52 -0700 |
commit | 82e0cca2733443906bde935df296b0d9fd21d6e5 (patch) | |
tree | 7babfa96ee2cd4c9436ac0ab043e1e9b3d7fb419 | |
parent | 8e713188410f66da32244aaf1fc44e22c8f721c2 (diff) | |
download | chef-zero-82e0cca2733443906bde935df296b0d9fd21d6e5.tar.gz |
Fix issue where default objects didn't report their deletion
-rw-r--r-- | lib/chef_zero/chef_data/default_creator.rb | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/chef_zero/chef_data/default_creator.rb b/lib/chef_zero/chef_data/default_creator.rb index eecc213..ad92ff6 100644 --- a/lib/chef_zero/chef_data/default_creator.rb +++ b/lib/chef_zero/chef_data/default_creator.rb @@ -35,12 +35,13 @@ module ChefZero def deleted(path) # acl deletes mean nothing, they are entirely subservient to their # parent object - unless path[0] == 'acls' || (path[0] == 'organizations' && path[2] == 'acls') - result = exists?(path) - @deleted[path] = true - result + if path[0] == 'acls' || (path[0] == 'organizations' && path[2] == 'acls') + return false end - false + + result = exists?(path) + @deleted[path] = true + result end def deleted?(path) @@ -211,12 +212,6 @@ module ChefZero get_org_acl_default(path) elsif path.size >= 4 - if !osc_compat && path[2] == 'users' - if @creators[path[0..1]] && @creators[path[0..1]].include?(path[3]) - return {} - end - end - if path[2] == 'containers' && path.size == 4 if exists?(path) return {} |