Le serveur gitlab sera inaccessible le mercredi 19 février 2020 de 13h à 14h pour une intervention de maintenance programmée.

Commit 5685e9e6 authored by grisel-davy's avatar grisel-davy

Correction de redirection

parent 1ca1b28a
......@@ -156,10 +156,13 @@ ModelC)
for msg in error_messages:
messages.error(
request, msg or "Vous ne pouvez pas accéder à ce menu")
return redirect(reverse(
'users:profil',
kwargs={'userid': str(request.user.id)}
))
if request.user.is_authenticated:
return redirect(reverse(
'users:profil',
kwargs={'userid': str(request.user.id)}
))
else:
return redirect(reverse('login'))
return view(request, *chain(instances, args), **kwargs)
return wrapper
return decorator
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment