mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 07:23:46 +00:00
Correction de redirection
This commit is contained in:
parent
1ca1b28a36
commit
5685e9e69c
1 changed files with 7 additions and 4 deletions
11
re2o/acl.py
11
re2o/acl.py
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue