diff --git a/README.md b/README.md index 15ca1ba..e248be6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # gCube System - User Registration Hook -This component is a Liferay 6.2.6 CE Hook which intercepts new user accounts creation and removal and performs the related Workspace actions (on sHub and LDAP) +This component is a Liferay 6.2.6 CE Hook which intercepts new user accounts creation and removal and performs the related Workspace actions (on sHub and LDAP and Auth) * The source code is present in the src folder. diff --git a/src/main/java/org/gcube/portal/usersaccount/Constants.java b/src/main/java/org/gcube/portal/usersaccount/Constants.java index 93bfecc..e0aba43 100644 --- a/src/main/java/org/gcube/portal/usersaccount/Constants.java +++ b/src/main/java/org/gcube/portal/usersaccount/Constants.java @@ -2,6 +2,4 @@ package org.gcube.portal.usersaccount; public class Constants { public static final String AUTORISED_INFRA_ROLE = "Infrastructure-Manager"; - public static final String USERNAME_PREFERENCE_KEY = "admin.reserved.screen.names"; - } diff --git a/src/main/java/org/gcube/portal/usersaccount/MyCreateUserAccountListener.java b/src/main/java/org/gcube/portal/usersaccount/MyCreateUserAccountListener.java index 513e46f..95a6936 100644 --- a/src/main/java/org/gcube/portal/usersaccount/MyCreateUserAccountListener.java +++ b/src/main/java/org/gcube/portal/usersaccount/MyCreateUserAccountListener.java @@ -1,6 +1,7 @@ package org.gcube.portal.usersaccount; import org.gcube.portal.notifications.thread.NewUserAccountNotificationThread; +import org.gcube.portal.removeaccount.thread.RemoveUserTokenFromInfraThread; import org.gcube.portal.removeaccount.thread.RemovedUserAccountThread; import org.gcube.portal.removeaccount.thread.RemovedUserFromLDAPThread; import org.slf4j.Logger; @@ -44,6 +45,10 @@ public class MyCreateUserAccountListener extends BaseModelListener { _log.info("Trying to remove user from LDAP ..."); Thread removeFromLDAPThread = new Thread(new RemovedUserFromLDAPThread(username2Delete)); removeFromLDAPThread.start(); + + _log.info("Trying to remove user from Auth ..."); + Thread deleteAllUserAuthThread = new Thread(new RemoveUserTokenFromInfraThread(username2Delete)); + deleteAllUserAuthThread.start(); } catch (Exception e) { e.printStackTrace(); }