portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "curro" <franciscojavier.ros...@avarmar.com>
Subject RE: Change group's name
Date Thu, 20 May 2010 16:07:52 GMT
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:d.taylor@onehippo.com] 
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
<franciscojavier.rosado@avarmar.com> 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: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org

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: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message