Opened 6 months ago
Closed 5 months ago
#9163 closed defect (bug) (fixed)
Admin cannot be demoted or removed from a group when he's the only one left
Reported by: | espellcaste | Owned by: | espellcaste |
---|---|---|---|
Milestone: | 14.0.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Groups | Keywords: | |
Cc: | emaralive |
Description
See convo here. Also, related to #9158.
Let's make sure this is true for the BP REST API, GraphQL API, and the BP CLI.
Change History (5)
#2
@
6 months ago
Fix for the BP REST API: https://github.com/buddypress/BP-REST/pull/509
#3
@
5 months ago
Fix for the WP BP CLI: https://github.com/buddypress/wp-cli-buddypress/pull/110
This ticket was mentioned in Slack in #buddypress by emaralive. View the logs.
5 months ago
Note: See
TracTickets for help on using
tickets.
@espellcaste FWIW, I believe this is isolated to Site Admins whereby they and only they can demote all Group admins to a role of Group Mod or Group Member, leaving a Group with no Group Admins via the REST API (additionally, I believe the BuddyPress Nouveau template pack utilizes the REST API) and BP ClI.
In a nutshell, the BuddyPress Legacy template pack checks if there are any Group Admins left after a demotion attempt (See Lines 387 - 401 of
src/bp-groups/bp-groups-admin.php
and cast an error, if not (including if a Site Admin attempts this action). Needless to say, this appears not to be the case for the REST API and BP ClI as it pertains to the Site Admin.Regarding, BP ClI I was waiting for BP 14 to be introduced, since version 3.0.0 is proposed to be included, before submitting tickets against this version. However, since @needle included this deficiency within #9158 and @imath brought up this ticket within dev-chat for May 22, 2024 , I thought I would include a bye to bye during dev-chat.