2022-08-19 07:51:49 +02:00
|
|
|
"""
|
|
|
|
Author: Michel Peltriaux
|
|
|
|
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
|
|
|
Contact: ksp-servicestelle@sgdnord.rlp.de
|
|
|
|
Created on: 19.08.22
|
|
|
|
|
|
|
|
"""
|
|
|
|
from django.contrib.auth.decorators import login_required
|
2022-08-22 08:12:55 +02:00
|
|
|
from django.utils.decorators import method_decorator
|
2022-08-19 07:51:49 +02:00
|
|
|
|
|
|
|
from ema.models import Ema
|
2022-08-25 11:34:09 +02:00
|
|
|
from konova.decorators import shared_access_required, conservation_office_group_required, login_required_modal
|
2022-08-22 08:12:55 +02:00
|
|
|
from konova.views.deadline import AbstractNewDeadlineView, AbstractRemoveDeadlineView, AbstractEditDeadlineView
|
2022-08-19 07:51:49 +02:00
|
|
|
|
|
|
|
|
2022-08-22 08:12:55 +02:00
|
|
|
class NewEmaDeadlineView(AbstractNewDeadlineView):
|
|
|
|
model = Ema
|
|
|
|
redirect_url = "ema:detail"
|
2022-08-19 07:51:49 +02:00
|
|
|
|
2022-08-25 11:34:09 +02:00
|
|
|
@method_decorator(login_required_modal)
|
2022-08-22 08:12:55 +02:00
|
|
|
@method_decorator(login_required)
|
|
|
|
@method_decorator(conservation_office_group_required)
|
|
|
|
@method_decorator(shared_access_required(Ema, "id"))
|
|
|
|
def dispatch(self, request, *args, **kwargs):
|
|
|
|
return super().dispatch(request, *args, **kwargs)
|
2022-08-19 07:51:49 +02:00
|
|
|
|
|
|
|
|
2022-08-22 08:12:55 +02:00
|
|
|
class EditEmaDeadlineView(AbstractEditDeadlineView):
|
|
|
|
model = Ema
|
|
|
|
redirect_url = "ema:detail"
|
2022-08-19 07:51:49 +02:00
|
|
|
|
2022-08-25 11:34:09 +02:00
|
|
|
@method_decorator(login_required_modal)
|
2022-08-22 08:12:55 +02:00
|
|
|
@method_decorator(login_required)
|
|
|
|
@method_decorator(conservation_office_group_required)
|
|
|
|
@method_decorator(shared_access_required(Ema, "id"))
|
|
|
|
def dispatch(self, request, *args, **kwargs):
|
|
|
|
return super().dispatch(request, *args, **kwargs)
|
2022-08-19 07:51:49 +02:00
|
|
|
|
|
|
|
|
2022-08-22 08:12:55 +02:00
|
|
|
class RemoveEmaDeadlineView(AbstractRemoveDeadlineView):
|
|
|
|
model = Ema
|
|
|
|
redirect_url = "ema:detail"
|
2022-08-19 07:51:49 +02:00
|
|
|
|
2022-08-25 11:34:09 +02:00
|
|
|
@method_decorator(login_required_modal)
|
2022-08-22 08:12:55 +02:00
|
|
|
@method_decorator(login_required)
|
|
|
|
@method_decorator(conservation_office_group_required)
|
|
|
|
@method_decorator(shared_access_required(Ema, "id"))
|
|
|
|
def dispatch(self, request, *args, **kwargs):
|
|
|
|
return super().dispatch(request, *args, **kwargs)
|
2022-08-19 07:51:49 +02:00
|
|
|
|