From 659b52a721fc252efe762d813bb1d7a308814500 Mon Sep 17 00:00:00 2001 From: kovacspe Date: Fri, 12 Apr 2024 22:49:52 +0200 Subject: [PATCH] Remove hotfix --- competition/permissions.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/competition/permissions.py b/competition/permissions.py index fe9b803d..5dc946f1 100644 --- a/competition/permissions.py +++ b/competition/permissions.py @@ -42,9 +42,8 @@ def has_permission(self, request, view): if request.method in permissions.SAFE_METHODS: return True - # TODO: PremyslieŤ ako rozumne checkovať permission. - # if request.method == 'POST': - # return view.get_serializer().Meta.model.can_user_create(request.user, request.data) + if request.method == 'POST': + return view.get_serializer().Meta.model.can_user_create(request.user, request.data) return request.user.is_authenticated and request.user.is_staff