summaryrefslogtreecommitdiffstats
path: root/dashboard/src/api/views.py
diff options
context:
space:
mode:
authorSawyer Bergeron <sbergeron@iol.unh.edu>2018-02-16 15:50:22 -0500
committerSawyer Bergeron <sbergeron@iol.unh.edu>2018-02-16 15:50:22 -0500
commit3979c0cc8fc863b1661353e96e17ffa166abfa96 (patch)
treed68e8231d67f086724ef3a3617252048f7c91c84 /dashboard/src/api/views.py
parent7734f7abbf16bc2b86c93d4b8cc510b1d86862c4 (diff)
Expose Limited User Info Through API
Jira: PHAROS-362 Exposes info such as username and user email throught the API to facilitate better backend integration Change-Id: I8948f399000ffe41d5b75941f4a4195caaea91f4 Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Diffstat (limited to 'dashboard/src/api/views.py')
-rw-r--r--dashboard/src/api/views.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/dashboard/src/api/views.py b/dashboard/src/api/views.py
index c16d57d..b873ef1 100644
--- a/dashboard/src/api/views.py
+++ b/dashboard/src/api/views.py
@@ -16,6 +16,7 @@ from rest_framework import viewsets
from rest_framework.authtoken.models import Token
from api.serializers import *
+from account.models import UserProfile
from booking.models import Booking
from dashboard.models import Resource, Server, ResourceStatus
@@ -45,6 +46,10 @@ class NotifierViewSet(viewsets.ModelViewSet):
queryset = Notifier.objects.none()
serializer_class = NotifierSerializer
+class UserViewSet(viewsets.ModelViewSet):
+ queryset = UserProfile.objects.all()
+ serializer_class = UserSerializer
+
@method_decorator(login_required, name='dispatch')
class GenerateTokenView(View):
def get(self, request, *args, **kwargs):