Note: This module is universal. Functions in this module can run on both the backend and frontend, unless specified otherwise.
The JoinGroupRequests API provides functionality for managing requests to join a group.
Notes:
privacyStatus
is updated from PRIVATE
to PUBLIC
, all pending join requests for that group are automatically approved.privacyStatus
is updated from PRIVATE
to SECRET
, all pending join requests for that group are automatically rejected.PRIVATE
, a site member can request to join the group on your site's Groups List page.membersCanApprove
is set to true
.wix-auth
elevate()
function is used, all permissions are overridden,, and all site members (including non-group members) can approve or reject site member requests to join a group.PUBLIC
, a site member can join the group (no request necessary).SECRET
, only site members added by an existing group member can join the group (no request necessary).The JoinGroupRequests 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:
approveJoinGroupRequests()
- All site members (including non-group members) can approve site member requests to join a group.listJoinGroupRequests()
- All site members (including non-group members) can see requests to join a group.queryJoinGroupRequests()
- All site members (including non-group members) can query requests to join a group.rejectJoinGroupRequests()
- All site members (including non-group members) can reject site member requests to join a group.Warning: Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.
To use the JoinGroupRequests API, import JoinGroupRequests
from the wix-groups-v2
module:
1