Skip to:
Content

BuddyPress.org

Opened 9 years ago

Closed 9 years ago

#6657 closed defect (bug) (wontfix)

Insufficient permission on pending user pages when BP_ENABLE_MULTIBLOG is true

Reported by: sbrajesh's profile sbrajesh Owned by: imath's profile imath
Milestone: Priority: normal
Severity: normal Version:
Component: Members Keywords:
Cc: sbrajesh

Description

When BP_ENABLE_MULTIBLOG is true, BuddyPress adds the "pending" etc links on a sub site's Manage Users screen but clicking on those links lead to "You do not have sufficient permission to access this page".

Ho To Reproduce:-

  1. Network Activate BuddyPress
  2. Put define( 'BP_ENABLE_MULTIBLOG', true ); in bp-custom.php
  3. Create a sub site
  4. Visit sub site's Dashboard->Users->All Users, you will see the "Pending" link above the user list
  5. Click on that and you will get the error.

The issue is in bp-members/bp-members-admin.php line 417(current trunk) does not check for the BP_ENABLE_MULTIBLOG and skips adding user page if it is a multisite install and we are not on network admin.

For a Multiblog mode enabled network, the user management capabilities should be available on the sub sites as well. So, the links are correctly added. Only the issue is with user pages handling those links are not added.

The attached patch fixes it. Will appreciate if you can take a look at this.

Thank you

Attachments (2)

6657.patch (559 bytes) - added by sbrajesh 9 years ago.
6657-2.patch (568 bytes) - added by sbrajesh 9 years ago.
Updated patch

Download all attachments as: .zip

Change History (12)

@sbrajesh
9 years ago

#1 @boonebgorges
9 years ago

  • Milestone changed from Awaiting Review to 2.4

We have a function bp_core_do_network_admin() that should be used here instead. imath, can you verify please?

#2 @sbrajesh
9 years ago

Hopefully yes, That condition can be simply substituted by

if( ! bp_core_do_network_admin() || is_network_admin() )

#3 @DJPaul
9 years ago

  • Keywords needs-testing added
  • Milestone changed from 2.4 to 2.5

I don't think any current contributors have a multiblog environment for testing, so let's look at this for 2.5.

#4 @DJPaul
9 years ago

  • Keywords needs-patch added; has-patch needs-testing removed

Let's get the patch updated so we can test it.

#5 @sbrajesh
9 years ago

  • Keywords has-patch added; needs-patch removed

Hi, Please find the updated patch with the recommended function by boonebgorges.

@sbrajesh
9 years ago

Updated patch

#6 @boonebgorges
9 years ago

  • Owner set to imath
  • Status changed from new to assigned

@imath, is "pomme de terre chaud" a saying in French? :-D https://en.wikipedia.org/wiki/Hot_potato_%28game%29

#7 @imath
9 years ago

@boonebgorges ahah we would say "patate chaude" actually! Thanks for sending it to me ;)
After a first look at the patch it looks like a reverse of a patch we've committed to make it work when BuddyPress is not activated network widely.

Will try to find a way to make it work under all possible configs asap.

#8 @imath
9 years ago

  • Keywords close added; has-patch removed

Ok, i think this behavior :

  1. Visit sub site's Dashboard->Users->All Users, you will see the "Pending" link above the user list

is not correct. No view should be added on a subsite to manage signups. Because signups are not related to a site but to the network.

When a user signs up on a multisite config, he has no role on any site. So i really think signups must be managed at the network level.

So the only trouble with multiblog is #6371. If no objection, i think we should close this ticket and focus on fixing #6371 (i'm adding a patch to it right away)

#9 @sbrajesh
9 years ago

Looking at it from your perspective, seems this is unexpected behavior. Yes, even with the multi blog mode the users are shown pending in that particular blog but on activation not getting added to it. So, It does not make any sense then.

Feel free to close this ticket.

#10 @imath
9 years ago

  • Keywords close removed
  • Milestone 2.5 deleted
  • Resolution set to wontfix
  • Status changed from assigned to closed

Thanks for your feedback @sbrajesh let's focus on #6371 :)

Note: See TracTickets for help on using tickets.