Hello
How can I get all users from group (example GROUP_test_1 ) and inner groups (example GROUP_test_1_1)?
This code:
authorityService.getContainedAuthorities(AuthorityType.USER, "GROUP_test_1 ", true)
return only users from group GROUP_test_1, ignore users from GROUP_test_1_1.
authorityService.getContainedAuthorities(AuthorityType.USER, "GROUP_test_1 ", true)return only users from group GROUP_test_1, ignore users from GROUP_test_1_1.
Seems you are using wrong flag, the last parameter should be false.
final Set<String> users = authorityService.getContainedAuthorities(AuthorityType.USER, "GROUP_test_1", false);
The last flag is whether to get immediate users or in-depth user:
immediate
--> if true, limit the depth to just immediate child, if false find authorities at any depthAsk for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.