﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29212	Redirect loop with @permission_required and redirect_authenticated_user	Nick Pope	Nick Pope	"The `redirect_authenticated_user` option was added by ticket #12233.
When combined with `@permission_required` and the user does not have the specified permission(s), a redirect loop can occur.

We should document (and add tests) for this behaviour and recommend the following pattern to avoid the issue:

{{{#!python
@login_required
@permission_required('permission', raise_exception=True)
def view(request):
    # ...
}}}

Documentation to be updated:

- https://docs.djangoproject.com/en/2.0/topics/auth/default/#django.contrib.auth.views.LoginView
- https://docs.djangoproject.com/en/2.0/topics/auth/default/#the-permission-required-decorator"	Bug	closed	Documentation	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
