8
0
Fork 0
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:
Hugo Levy-Falk 2019-09-05 19:16:37 +02:00
parent 6a44a32ecd
commit 919484683e

View file

@ -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