def _is_task_visible(context, task):
    """Return True if the task is visible in this context."""
    if context.is_admin:
        return True
    if task['owner'] is None:
        return True
    if context.owner is not None:
        if context.owner == task['owner']:
            return True
    return False
