Modified download permission logic to allow users with view permissions access