Fix UV_endpoint auth

This commit is contained in:
tleb
2019-10-20 18:26:11 +02:00
parent 4759551c16
commit 86bc491df4
4 changed files with 6 additions and 6 deletions

View File

@ -12,10 +12,7 @@ from pedagogy.views import CanCreateUVFunctionMixin
@api_view(["GET"])
@renderer_classes((JSONRenderer,))
def uv_endpoint(request):
# is authenticated and has the right to create an UV
if not request.user.is_authenticated or not CanCreateUVFunctionMixin.can_create_uv(
request.user
):
if not CanCreateUVFunctionMixin.can_create_uv(request.user):
raise PermissionDenied
params = request.query_params