# Fixes Permission check order
* fixes bug where permissions would be checked on non-logged in users which caused errors
This commit is contained in:
@@ -3,6 +3,7 @@ Author: Michel Peltriaux
|
||||
Created on: 14.12.25
|
||||
|
||||
"""
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
from django.utils.decorators import method_decorator
|
||||
|
||||
from intervention.models import Intervention
|
||||
@@ -15,5 +16,5 @@ class RemoveInterventionView(AbstractRemoveView):
|
||||
_REDIRECT_URL = "intervention:index"
|
||||
|
||||
@method_decorator(shared_access_required(Intervention, "id"))
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
||||
return super().get(request, *args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user