added method to get photos by permission