Create a headless API to retrieve the users of a given segment.
To try this:
If you use an admin user, the user can see all the users of the segment:
If you use a regular user that doesn't have the permission to view users, the user can only see itself:
- Ticket: https://issues.liferay.com/browse/LPS-93530
- Class: https://github.com/liferay/liferay-portal/blob/master/modules/apps/headless/headless-admin-user/headless-admin-user-test/src/testIntegration/java/com/liferay/headless/admin/user/resource/v1_0/test/SegmentUserResourceTest.java
- If the user introduces the wrong endpoint, 404 error shows up.
- If the user introduces the wrong credentials to the request, 403 error shows up.
- If the user introduces a not exiting segmentId, the API retrieves an empty list.
- As an admin user, I can list all the users of the segment.
- As a regular user, I can list my user but I can't see other users.