mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
Do not fail on ACL with unauthenticated users.
This commit is contained in:
parent
6a44a32ecd
commit
919484683e
1 changed files with 9 additions and 4 deletions
13
re2o/acl.py
13
re2o/acl.py
|
@ -158,10 +158,15 @@ ModelC)
|
|||
messages.error(
|
||||
request, msg or _("You don't have the right to access"
|
||||
" this menu."))
|
||||
return redirect(reverse(
|
||||
'users:profil',
|
||||
kwargs={'userid': str(request.user.id)}
|
||||
))
|
||||
if request.user.id is not None:
|
||||
return redirect(reverse(
|
||||
'users:profil',
|
||||
kwargs={'userid': str(request.user.id)}
|
||||
))
|
||||
else:
|
||||
return redirect(reverse(
|
||||
'index',
|
||||
))
|
||||
return view(request, *chain(instances, args), **kwargs)
|
||||
return wrapper
|
||||
return decorator
|
||||
|
|
Loading…
Reference in a new issue