class Chef::ChefFS::FileSystem::ChefServer::AclsDir
Constants
- ENTITY_TYPES
Public Instance Methods
api_path()
click to toggle source
# File lib/chef/chef_fs/file_system/chef_server/acls_dir.rb, line 37 def api_path parent.api_path end
can_have_child?(name, is_dir)
click to toggle source
# File lib/chef/chef_fs/file_system/chef_server/acls_dir.rb, line 45 def can_have_child?(name, is_dir) is_dir ? ENTITY_TYPES.include?(name) : name == "organization.json" end
children()
click to toggle source
# File lib/chef/chef_fs/file_system/chef_server/acls_dir.rb, line 49 def children if @children.nil? @children = ENTITY_TYPES.map do |entity_type| # All three of these can be versioned (NAME-VERSION), but only have # one ACL that covers them all (NAME.json). case entity_type when "cookbooks", "cookbook_artifacts" CookbooksAclDir.new(entity_type, self) when "policies" PoliciesAclDir.new(entity_type, self) else AclDir.new(entity_type, self) end end @children << AclEntry.new("organization.json", self, true) # the org acl is retrieved as GET /organizations/ORGNAME/ANYTHINGATALL/_acl end @children end
data_handler()
click to toggle source
# File lib/chef/chef_fs/file_system/chef_server/acls_dir.rb, line 33 def data_handler @data_handler ||= Chef::ChefFS::DataHandler::AclDataHandler.new end
make_child_entry(name)
click to toggle source
# File lib/chef/chef_fs/file_system/chef_server/acls_dir.rb, line 41 def make_child_entry(name) children.find { |child| child.name == name } end
rest()
click to toggle source
# File lib/chef/chef_fs/file_system/chef_server/acls_dir.rb, line 68 def rest parent.rest end