mpeltriaux
7b35591f5d
* adds AbstractRecordView to konova/views/record.py * implements for all major data types
24 lines
820 B
Python
24 lines
820 B
Python
"""
|
|
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
|
|
from django.utils.decorators import method_decorator
|
|
|
|
from compensation.models import EcoAccount
|
|
from konova.decorators import shared_access_required, conservation_office_group_required
|
|
from konova.views.record import AbstractRecordView
|
|
|
|
|
|
class EcoAccountRecordView(AbstractRecordView):
|
|
model = EcoAccount
|
|
|
|
@method_decorator(login_required)
|
|
@method_decorator(conservation_office_group_required)
|
|
@method_decorator(shared_access_required(EcoAccount, "id"))
|
|
def dispatch(self, request, *args, **kwargs):
|
|
return super().dispatch(request, *args, **kwargs)
|