Browse Source

also the token is removed from the infra

pull/1/head
Massimiliano Assante 2 years ago
parent
commit
67eeafea13
  1. 2
      README.md
  2. 2
      src/main/java/org/gcube/portal/usersaccount/Constants.java
  3. 5
      src/main/java/org/gcube/portal/usersaccount/MyCreateUserAccountListener.java

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

2
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";
}

5
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<User> {
_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();
}

Loading…
Cancel
Save