Hi all,
We want to set Groups for Users via the API, as far as I can tell, there are two ways to change group membership:
- PUT /api/v1/groups/:groupId/members with { "userIds": }
- PUT /api/v1/users/:userId/groups with { "groupIds": [...] }
Looking at src/groups.js, both seem to replace rather than add:
- setMembers() first runs DELETE FROM groupMembers WHERE groupId = ? and then inserts only the userIds from the request.
- setLocalMembership() first removes the user from all local groups and then inserts only the groupIds from the request.
-> This means we cant just Add a new user to a Groupe via API correct? We woud always have to first get the Group then take all the listed useres Append the new users and run the Put groups API with the Appended list - or do the same with all current groups from a user?