diff options
author | Thom May <thom@may.lt> | 2016-08-01 21:55:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-01 21:55:42 +0100 |
commit | c9c460e44878fb98481ffabb8bbfa174aa9c110e (patch) | |
tree | 6c990033afd05f90dfa6ebae7bfe54289e384273 /lib/chef/chef_fs | |
parent | 6b88d8c1bd89f9864478fc873352c2881441dbfe (diff) | |
parent | 9b48a9c38489bc624e1f9235c48994cc5d63173e (diff) | |
download | chef-c9c460e44878fb98481ffabb8bbfa174aa9c110e.tar.gz |
Merge pull request #5155 from chef/tm/fix_acl_files
Root ACLs are a top level json file not a sub-directory
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) |