diff options
author | Thom May <thom@chef.io> | 2016-08-01 18:25:54 +0100 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-08-01 18:35:19 +0100 |
commit | 9b48a9c38489bc624e1f9235c48994cc5d63173e (patch) | |
tree | 6c990033afd05f90dfa6ebae7bfe54289e384273 /lib/chef/chef_fs | |
parent | 6b88d8c1bd89f9864478fc873352c2881441dbfe (diff) | |
download | chef-9b48a9c38489bc624e1f9235c48994cc5d63173e.tar.gz |
Root ACLs are a top level json file not a sub-directorytm/fix_acl_files
Ensure that we correctly write to them and manage them.
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'lib/chef/chef_fs')
-rw-r--r-- | lib/chef/chef_fs/file_system/repository/acls_dir.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/chef/chef_fs/file_system/repository/acls_dir.rb b/lib/chef/chef_fs/file_system/repository/acls_dir.rb index 619031aa70..110befdf22 100644 --- a/lib/chef/chef_fs/file_system/repository/acls_dir.rb +++ b/lib/chef/chef_fs/file_system/repository/acls_dir.rb @@ -28,14 +28,16 @@ class Chef module Repository class AclsDir < Repository::Directory + BARE_FILES = %w{ organization.json root } + def can_have_child?(name, is_dir) - is_dir ? Chef::ChefFS::FileSystem::ChefServer::AclsDir::ENTITY_TYPES.include?(name) : name == "organization.json" + is_dir ? Chef::ChefFS::FileSystem::ChefServer::AclsDir::ENTITY_TYPES.include?(name) : BARE_FILES.include?(name) end protected def make_child_entry(child_name) - if child_name == "organization.json" + if BARE_FILES.include? child_name Acl.new(child_name, self) else AclsSubDir.new(child_name, self) |