Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 12 years ago

Last modified 10 years ago

#5076 closed defect (bug) (fixed)

Group Admin UI autocomplete should exclude admin, mods..

Reported by: imath's profile imath Owned by: boonebgorges's profile boonebgorges
Milestone: 1.8 Priority: normal
Severity: normal Version: 1.8
Component: Groups Keywords: has-patch
Cc:

Description

Once on the admin group edit screen, we can use the excellent autocomplete feature to add new members. The users that are already members are not shown, but i've noticed that as an admin of the group, my name was showing, so i can add myself a second time to the group. If i save, i have a message saying that imath was successfully added to the group.

The problem seems to be that the arguments that is waited by BP_Group_Member_Query is group_role and the one sent in bp_groups_admin_autocomplete_handler() is group_type. So as the default value for the argument group_role of BP_Group_Member_Query is array( 'member') it explains we cannot add a group member twice, but we can add a group mod, a group admin twice..

I suggest the diff to be sure an admin or a mod aren't added twice.

Attachments (1)

5076.diff (545 bytes) - added by imath 12 years ago.

Download all attachments as: .zip

Change History (4)

@imath
12 years ago

#1 @r-a-y
12 years ago

  • Keywords 2nd-opinion removed
  • Milestone changed from Awaiting Review to 1.8

#2 @boonebgorges
12 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 7242:

Corrects incorrect param name in Groups Admin autocomplete AJAX handler

'group_type' was a typo for 'group_role'. As a result, the autocomplete was
excluding Members only, rather than Members + Mods + Admins.

Fixes #5076

Props imath

#3 @johnjamesjacoby
10 years ago

  • Version changed from 1.8-beta to 1.8
Note: See TracTickets for help on using tickets.