Even simpler:

```python
if hasattr(request, 'user') and request.user.is_authenticated():
    # .. do what you have before
else:
    queryset = super(QueriesResource, self).get_queryset(request, **kwargs)
return queryset
```