cancel
Showing results for 
Search instead for 
Did you mean: 

AuthorityService.createAuthority() method problems

sergio
Champ in-the-making
Champ in-the-making
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
1 REPLY 1

andy
Champ on-the-rise
Champ on-the-rise
Hi

See the authority related tests for lots of examples.

Regards

Andy
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.