mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Fix UV_endpoint auth
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user