usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [46/83] [abbrv] usergrid git commit: Fix issue with admin user confirmation flag not working when trying to disable emails.
Date Mon, 24 Oct 2016 13:06:31 GMT
Fix issue with admin user confirmation flag not working when trying to disable emails.


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/1894d61d
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/1894d61d
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/1894d61d

Branch: refs/heads/asf-site
Commit: 1894d61d4d0f2eaa2519f5b94ff39208ee65996d
Parents: 9fae803
Author: Michael Russo <mrusso@apigee.com>
Authored: Tue Sep 6 18:53:38 2016 -0700
Committer: Michael Russo <mrusso@apigee.com>
Committed: Tue Sep 6 18:53:38 2016 -0700

----------------------------------------------------------------------
 .../management/cassandra/ManagementServiceImpl.java   | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/1894d61d/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
index 21c6983..84b573b 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
@@ -2647,14 +2647,16 @@ public class ManagementServiceImpl implements ManagementService {
 
 
     public void sendAdminUserConfirmationEmail( UUID organizationId, UserInfo user ) throws
Exception {
-        String token = getConfirmationTokenForAdminUser(user.getUuid(), 0, organizationId);
-        OrganizationConfig orgConfig = organizationId != null ?
+        if (properties.newAdminUsersRequireConfirmation()) {
+            String token = getConfirmationTokenForAdminUser(user.getUuid(), 0, organizationId);
+            OrganizationConfig orgConfig = organizationId != null ?
                 getOrganizationConfigByUuid(organizationId) : getOrganizationConfigForUserInfo(user);
-        String confirmation_url = orgConfig.getFullUrl(WorkflowUrl.ADMIN_CONFIRMATION_URL,
user.getUuid().toString()) +
+            String confirmation_url = orgConfig.getFullUrl(WorkflowUrl.ADMIN_CONFIRMATION_URL,
user.getUuid().toString()) +
                 "?token=" + token;
-        sendAdminUserEmail( user, "User Account Confirmation: " + user.getEmail(),
-                emailMsg( hashMap( "confirm_email", user.getEmail() ).map( "confirmation_url",
confirmation_url ),
-                        PROPERTIES_EMAIL_ADMIN_CONFIRMATION ) );
+            sendAdminUserEmail(user, "User Account Confirmation: " + user.getEmail(),
+                emailMsg(hashMap("confirm_email", user.getEmail()).map("confirmation_url",
confirmation_url),
+                    PROPERTIES_EMAIL_ADMIN_CONFIRMATION));
+        }
     }
 
 


Mime
View raw message