Hi all.
Hi used the AuthorityService.createAuthority() method to create a new root group as following:
AuthenticationService authenticationService = serviceRegistry.getAuthenticationService();
authenticationService.authenticate("admin", "admin".toCharArray());
AuthorityService authorityService = serviceRegistry.getAuthorityService();
String authName = authorityService.createAuthority( AuthorityType.GROUP,
null,
"pippo");
The code apparently works: accessing the administration group web page I can see the new group just created but when trying to delete the group or add a user to it the following exception is thrown:
javax.faces.el.EvaluationException: Exception while invoking expression #{GroupsBean.setupGroupAction}
caused by:
org.alfresco.repo.security.authority.UnknownAuthorityException: An authority was not found for GROUP_pippo
I think my code is not completely correct…
Any suggestion will be appreciated.
All the best.
Sergio