fix #21803, create-user-portlet may notcreated user to all contexts
This commit is contained in:
parent
747b9a52d6
commit
9ca0963b76
|
@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
## [v3.0.1] - 2021-07-08
|
||||
|
||||
- Feature #21777, migrated to new AccessTokenProvider class
|
||||
- Bug fix #21803, create-user-portlet may not add the yet created user to all the context at once
|
||||
|
||||
## [v3.0.0] - 2020-09-24
|
||||
|
||||
|
|
|
@ -238,12 +238,16 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|||
logger.info("Create workspace via shub has been done, proceed with user add to VRE");
|
||||
// adding to the current VRE
|
||||
long userId = userManager.getUserId(user.getScreenName());
|
||||
userManager.assignUserToGroup(getCurrentGroupID(), userId);
|
||||
logger.debug("trying to send the event to create the account for this user to the orchestrator");
|
||||
logger.info("trying to send the event to create the account for this user to the orchestrator");
|
||||
long currGroupId = pContext.getCurrentGroupId(getThreadLocalRequest());
|
||||
Group theVRE = GroupLocalServiceUtil.getGroup(currGroupId);
|
||||
new CreateUserAddToVrePublisher().publish(
|
||||
CreateUserAddToVre.newEvent(user.getScreenName(), name, surname, email, INITIAL_PWD, theVRE));
|
||||
logger.debug("... sleeping 5 seconds");
|
||||
Thread.sleep(5000);
|
||||
logger.debug("... now adding his user to the VRE");
|
||||
userManager.assignUserToGroup(getCurrentGroupID(), userId);
|
||||
|
||||
if (sendEmail)
|
||||
sendEmailToUser(email, name + " " + surname);
|
||||
}catch(Exception e){
|
||||
|
|
Loading…
Reference in New Issue