Skip to content

Commit

Permalink
Add queryset to current user API
Browse files Browse the repository at this point in the history
If server is configured to use model permissions, each view set must
have a queryset so that there is a place from where to get the
permissions.
  • Loading branch information
lubomir committed Aug 6, 2015
1 parent eeedb7a commit 0580cc8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pdc/apps/auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import json

from django.shortcuts import render, redirect
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.auth import REDIRECT_FIELD_NAME, get_user_model
from django.contrib.auth.models import Group, Permission
from django.http import HttpResponseRedirect, HttpResponse
from django.conf import settings
Expand Down Expand Up @@ -533,6 +533,8 @@ class CurrentUserViewSet(mixins.ListModelMixin,
This end-point provides programmatic access to information about current
user.
"""
queryset = get_user_model().objects.none()

def list(self, request):
"""
Get information about current user.
Expand Down

0 comments on commit 0580cc8

Please sign in to comment.