forked from DGNum/gestioCOF
Better handling of non-authorized users in config edition view
This commit is contained in:
parent
0235c4f7e8
commit
afa6972280
1 changed files with 1 additions and 1 deletions
|
@ -783,7 +783,7 @@ class ConfigUpdate(FormView):
|
||||||
|
|
||||||
def dispatch(self, request, *args, **kwargs):
|
def dispatch(self, request, *args, **kwargs):
|
||||||
if request.user is None or not request.user.is_superuser:
|
if request.user is None or not request.user.is_superuser:
|
||||||
raise Http404
|
return redirect_to_login(request.get_full_path())
|
||||||
return super().dispatch(request, *args, **kwargs)
|
return super().dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
|
|
Loading…
Reference in a new issue