'Does HDA correspond to dataset that is an a valid state and is
accessible to user.'

def hda_accessible(self, hda, check_security=True):

    dataset = hda.dataset
    has_tool = self.tool
    if has_tool:
        valid_input_states = self.tool.valid_input_states
    else:
        valid_input_states = galaxy.model.Dataset.valid_input_states
    state_valid = (dataset.state in valid_input_states)
    return (state_valid and ((not check_security) or self.__can_access_dataset(dataset)))
