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 2019/10/17 21:30:01 UTC
[airavata-django-portal] branch master updated: Don't fail login
for cms editing use cases
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
The following commit(s) were added to refs/heads/master by this push:
new 019d289 Don't fail login for cms editing use cases
019d289 is described below
commit 019d28992e0cce3aaf35d816156f85447f31da48
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Oct 17 10:04:46 2019 -0400
Don't fail login for cms editing use cases
---
django_airavata/apps/workspace/signals.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/django_airavata/apps/workspace/signals.py b/django_airavata/apps/workspace/signals.py
index 460f156..2099801 100644
--- a/django_airavata/apps/workspace/signals.py
+++ b/django_airavata/apps/workspace/signals.py
@@ -19,5 +19,8 @@ def initialize_user_profile(sender, request, user, **kwargs):
# following is necessary for users coming from federated login who don't
# need to verify their email.
authz_token = get_authz_token(request)
- user_profile_client_pool.initializeUserProfile(authz_token)
- log.debug("initialized user profile for {}".format(user.username))
+ if authz_token is not None:
+ user_profile_client_pool.initializeUserProfile(authz_token)
+ log.debug("initialized user profile for {}".format(user.username))
+ else:
+ log.warning(f"Logged in user {user.username} has no access token")