Import nicht mehr aufrufbar
This commit is contained in:
parent
cfb50385fd
commit
74a6b2d0c2
14
adm/views.py
14
adm/views.py
|
|
@ -671,6 +671,13 @@ class AdmAddBreak(CreateView):
|
||||||
class AdmImport(TemplateView):
|
class AdmImport(TemplateView):
|
||||||
template_name="adm/adm_import_overview.html"
|
template_name="adm/adm_import_overview.html"
|
||||||
|
|
||||||
|
def dispatch(self, *args, **kwargs):
|
||||||
|
if(checkForStuffUser(self.request)):
|
||||||
|
return super().dispatch(*args, **kwargs)
|
||||||
|
else:
|
||||||
|
messages.warning(self.request, f'Sie benötigen einen Mitarbeiter-Account, um diese Seiten aufzurufen!')
|
||||||
|
return redirect("login")
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
context.update({'active_link' : 'adm-import'})
|
context.update({'active_link' : 'adm-import'})
|
||||||
|
|
@ -684,6 +691,13 @@ from cloud.models import *
|
||||||
class AdmImportFlow(TemplateView):
|
class AdmImportFlow(TemplateView):
|
||||||
template_name="adm/adm_import_flow.html"
|
template_name="adm/adm_import_flow.html"
|
||||||
|
|
||||||
|
def dispatch(self, *args, **kwargs):
|
||||||
|
if(checkForStuffUser(self.request)):
|
||||||
|
return super().dispatch(*args, **kwargs)
|
||||||
|
else:
|
||||||
|
messages.warning(self.request, f'Sie benötigen einen Mitarbeiter-Account, um diese Seiten aufzurufen!')
|
||||||
|
return redirect("login")
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
context.update({'active_link' : 'adm-import'})
|
context.update({'active_link' : 'adm-import'})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue