get all users from group
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Labels:
- Labels:
-
Alfresco Content Services
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 depth
~Abhinav
(ACSCE, AWS SAA, Azure Admin)
(ACSCE, AWS SAA, Azure Admin)
