You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2021/12/10 21:43:00 UTC
[airavata-django-portal] 07/24: AIRAVATA-3468 Allow /media/ in completeness check middleware (gateway logo)
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit 06040f9b58def0f91d2f606d203d82cf616b036e
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Wed Jul 7 13:55:59 2021 -0400
AIRAVATA-3468 Allow /media/ in completeness check middleware (gateway logo)
---
django_airavata/apps/auth/middleware.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/django_airavata/apps/auth/middleware.py b/django_airavata/apps/auth/middleware.py
index 7921405..78ec89c 100644
--- a/django_airavata/apps/auth/middleware.py
+++ b/django_airavata/apps/auth/middleware.py
@@ -84,9 +84,9 @@ def user_profile_completeness_check(get_response):
return get_response(request)
if (not request.user.user_profile.is_complete and
- request.path != reverse('django_airavata_auth:user_profile') and
- request.path != reverse('django_airavata_auth:logout') and
- request.META['HTTP_ACCEPT'] != 'application/json'):
+ request.path != reverse('django_airavata_auth:user_profile') and
+ request.path != reverse('django_airavata_auth:logout') and
+ request.META['HTTP_ACCEPT'] != 'application/json') and not request.path.startswith("/media/"):
return redirect('django_airavata_auth:user_profile')
else:
return get_response(request)