10-31-2020 05:09 AM
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.
10-31-2020 12:53 PM
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 depthExplore our Alfresco products with the links below. Use labels to filter content by product module.