Note: This module is universal. Functions in this module can run on both the backend and frontend, unless specified otherwise.
The Members API provides functionality for managing group members, inluding adding, removing, and querying group members.
SECRET
, group admins or group members can add additional members to their group.PUBLIC
or PRIVATE
, group admins determine whether group members can add additional members to their group.addGroupMembers()
function (no approval required).addGroupMembers()
function.wix-auth
elevate()
function is used, all permissions are overridden, and all site members (including non-group members) can add additional members to a group.The Members API provides functionality allowing you to:
Permission requirements for the functions in this API can be overridden using the wix-auth
elevate()
function. This will have the following effects:
addGroupMembers()
- All site members (including non-group members) can add additional members to a group.listGroupMembers()
- All site members (including non-group members) can see the list of group members.listMemberships()
- All site members (including non-group members) can see a list of a site member's memberships.queryGroupMembers()
- All site members (including non-group members) can query group members.queryMemberships()
- All site members (including non-group members) can query a site member's memberships.removeGroupMembers()
- All site members (including non-group members) can remove members from a group.Warning: Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.
To use the Members API, import members
from the wix-groups-v2
module: