mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 19:33:11 +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
|
@ -158,10 +158,15 @@ ModelC)
|
||||||
messages.error(
|
messages.error(
|
||||||
request, msg or _("You don't have the right to access"
|
request, msg or _("You don't have the right to access"
|
||||||
" this menu."))
|
" this menu."))
|
||||||
|
if request.user.id is not None:
|
||||||
return redirect(reverse(
|
return redirect(reverse(
|
||||||
'users:profil',
|
'users:profil',
|
||||||
kwargs={'userid': str(request.user.id)}
|
kwargs={'userid': str(request.user.id)}
|
||||||
))
|
))
|
||||||
|
else:
|
||||||
|
return redirect(reverse(
|
||||||
|
'index',
|
||||||
|
))
|
||||||
return view(request, *chain(instances, args), **kwargs)
|
return view(request, *chain(instances, args), **kwargs)
|
||||||
return wrapper
|
return wrapper
|
||||||
return decorator
|
return decorator
|
||||||
|
|
Loading…
Reference in a new issue