class Chef::ChefFS::FileSystem::ChefServer::AclDir

Public Instance Methods

api_path() click to toggle source
# File lib/chef/chef_fs/file_system/chef_server/acl_dir.rb, line 28
def api_path
  parent.parent.child(name).api_path
end
can_have_child?(name, is_dir) click to toggle source
# File lib/chef/chef_fs/file_system/chef_server/acl_dir.rb, line 37
def can_have_child?(name, is_dir)
  !is_dir
end
children() click to toggle source
# File lib/chef/chef_fs/file_system/chef_server/acl_dir.rb, line 41
def children
  if @children.nil?
    # Grab the ACTUAL children (/nodes, /containers, etc.) and get their names
    names = parent.parent.child(name).children.map { |child| child.dir? ? "#{child.name}.json" : child.name }
    @children = names.map { |name| make_child_entry(name, true) }
  end
  @children
end
create_child(name, file_contents) click to toggle source
# File lib/chef/chef_fs/file_system/chef_server/acl_dir.rb, line 50
def create_child(name, file_contents)
  raise OperationNotAllowedError.new(:create_child, self, nil, "ACLs can only be updated, and can only be created when the corresponding object is created.")
end
data_handler() click to toggle source
# File lib/chef/chef_fs/file_system/chef_server/acl_dir.rb, line 54
def data_handler
  parent.data_handler
end
make_child_entry(name, exists = nil) click to toggle source
# File lib/chef/chef_fs/file_system/chef_server/acl_dir.rb, line 32
def make_child_entry(name, exists = nil)
  result = @children.find { |child| child.name == name } if @children
  result || AclEntry.new(name, self, exists)
end
rest() click to toggle source
# File lib/chef/chef_fs/file_system/chef_server/acl_dir.rb, line 58
def rest
  parent.rest
end