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 2017/12/13 20:24:05 UTC

[airavata] 02/03: AIRAVATA-2571 Use `state` field to indicate if Keycloak user is enabled

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.git

commit 7a9164fde6bf7434b5c957a6201a0123ead1ebd1
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Wed Dec 13 15:03:05 2017 -0500

    AIRAVATA-2571 Use `state` field to indicate if Keycloak user is enabled
---
 .../iam/admin/services/core/impl/TenantManagementKeycloakImpl.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/airavata-services/profile-service/iam-admin-services-core/src/main/java/org/apache/airavata/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java b/airavata-services/profile-service/iam-admin-services-core/src/main/java/org/apache/airavata/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
index cdb254e..4296bca 100644
--- a/airavata-services/profile-service/iam-admin-services-core/src/main/java/org/apache/airavata/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
+++ b/airavata-services/profile-service/iam-admin-services-core/src/main/java/org/apache/airavata/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
@@ -597,7 +597,12 @@ public class TenantManagementKeycloakImpl implements TenantManagementInterface {
         profile.setLastAccessTime(0);
         profile.setCreationTime(0);
         profile.setValidUntil(0);
-        profile.setState(Status.ACTIVE);
+        // Use state field to indicate whether user has been enabled in Keycloak
+        if (userRepresentation.isEnabled()) {
+            profile.setState(Status.CONFIRMED);
+        } else {
+            profile.setState(Status.PENDING_CONFIRMATION);
+        }
 
         return profile;
     }

-- 
To stop receiving notification emails like this one, please contact
"commits@airavata.apache.org" <co...@airavata.apache.org>.