Hi,
to answer my own question (and "for the record"). The user id or group id
cannot be changed once it is created (see
https://jackrabbit.apache.org/oak/docs/security/user/default.html ).
However, it is possible to set a value for a property with the name you
want to the Authorizable (user or group) and use that property as you see
fit. For example:

UserManager um = session.getUserManager();
Group myGroup = um.createGroup("myAwesomeGroup");
myGroup.setProperty("color" new StringValue("yellow"));

To get the value after you retrieved an authorizable you can use:
UserManager um = session.getUserManager();
Authorizable authorizable = um.getAuthorizable(group.getId());
Value[] propertyValues = authorizable.getProperty("color");
String color = null;
if (propertyValues != null) {
    color = propertyValues[0].getString();
}

Jorge

El jue., 7 may. 2020 a las 12:50, jorgeeflorez . (<
[email protected]>) escribió:

> Hi all,
> I was wondering, is it possible to change the name of a group?
> I am not sure about it and I want to confirm it, please.
>
> Thanks.
>
> Best Regards.
>
> Jorge
>

Reply via email to