airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata-django-portal] branch master updated: AIRAVATA-3088 Adding note about when initializeUserProfile is necessary
Date Fri, 12 Jul 2019 17:00:49 GMT
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 9b19d8d  AIRAVATA-3088 Adding note about when initializeUserProfile is necessary
9b19d8d is described below

commit 9b19d8d56d351b8869698fc6f0ef2fb74c814188
Author: Marcus Christie <machristie@apache.org>
AuthorDate: Fri Jul 12 13:00:33 2019 -0400

    AIRAVATA-3088 Adding note about when initializeUserProfile is necessary
---
 django_airavata/apps/workspace/signals.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/django_airavata/apps/workspace/signals.py b/django_airavata/apps/workspace/signals.py
index 3886011..460f156 100644
--- a/django_airavata/apps/workspace/signals.py
+++ b/django_airavata/apps/workspace/signals.py
@@ -14,6 +14,10 @@ log = logging.getLogger(__name__)
 @receiver(user_logged_in)
 def initialize_user_profile(sender, request, user, **kwargs):
     """Initialize user profile in Airavata in case this is a new user."""
+    # NOTE: if the user verified their email address then they should already
+    # have an Airavata user profile (See IAMAdminServices.enableUser). The
+    # 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))


Mime
View raw message