Change repository.all() to allow an optional user