def retrieve(self, request, pk=None): key = view_utils.get_key(self.keys, self.request.user) result = self.adapter().get( request, self.provider().get(pk, key) ) return Response(result)
def retrieve(self, request, pk=None, params=None): result = self.adapter().get(request, self.provider().get(pk, self.key.objects.get(owner=self.request.user))) key = view_utils.get_key(self.keys, self.request.user) result = self.adapter().list( request, params, self.provider().list(params, key) ) return Response(result)