def get_queryset(self):
    if IsAdminUser.has_permission(self, request=self.request, view=self.get_view_name()):
        return super().get_queryset()
    return super().get_queryset().filter(user=self.request.user)
def get_queryset(self):
    if IsAdminUser.has_permission(self, request=self.request, view=self.get_view_name()):
        return super().get_queryset()
    return super().get_queryset().filter(user=self.request.user)