getUserGroupsByMembership
Retrieves the user's groups categorized by their membership type.
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
user Required | IUser |
The user object containing group information. |
Returns
An object categorizing the user's groups into owner
, admin
, and member
.
The function processes the user's groups and classifies them based on the membership type:
owner
: Groups where the user is an owner.admin
: Groups where the user is an admin.member
: Groups where the user is a member and the group is not view-only.
Note: The none
membership type is not considered as it is not expected to be present in the user's groups.
Function defined in common/src/search/_internal/getUserGroupsByMembership.ts:18