Thanks David. Because there are dependencies users to group, group to group, role to group, group to organization, looked at whether you could just change the name. Change the group ID of disorder me many elements, such as the group logo, the office related to the group ...
Perhaps it should bring an improvement in the management of security principals for this point of view. Regards -----Original Message----- From: David Sean Taylor [mailto:[email protected]] Sent: miércoles, 19 de mayo de 2010 19:42 To: Jetspeed Developers List Subject: Re: Change group's name On Wed, May 19, 2010 at 8:00 AM, curro <[email protected]> wrote: > Hello all, > > > > Do Someone knows how change the name to a users group easily? It's a > requisite because into the organization change the name often. We have our > own interface to create and manage groups with group manager, but I can not > find how to change the name for a Principal. Each group cauld have easily > 2000 user or more, and create new group and transfer all user may be a > problem. > Changing principal names isn't supported, it requires deleting and adding the principal with a new name Recommend something like (perhaps i should add this API to Jetspeed): public void changeGroupName(String oldGroupName, String newGroupName) { Group group = groupManager.addGroup(newGroupName); List<User> usersInGroup = getUsersInGroup(oldGroupName); groupManager.removeGroup(oldGroupName); // will remove association for user->group for (User user : usersInGroup) { groupManager.addUserToGroup(user.getName(), newGroupName); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] Se certificó que el correo entrante no contiene virus. Comprobada por AVG - www.avg.es Versión: 9.0.819 / Base de datos de virus: 271.1.1/2883 - Fecha de la versión: 05/19/10 08:26:00 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
