allow views to refuse passive login (fixes #13627)

This commit is contained in:
Benjamin Dauvergne 2016-10-18 10:03:41 +02:00
parent 09ff054f57
commit 4a52cfee3e
1 changed files with 3 additions and 0 deletions

View File

@ -17,6 +17,9 @@ class PassiveAuthenticationMiddleware(object):
return response
def process_view(self, request, view_func, view_args, view_kwargs):
# Skip views asking to be skiped
if getattr(view_func, 'mellon_no_passive', False):
return
# Skip mellon views
if request.resolver_match.url_name and request.resolver_match.url_name.startswith('mellon_'):
return