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 | Owned by: | 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:-
- Network Activate BuddyPress
- Put define( 'BP_ENABLE_MULTIBLOG', true ); in bp-custom.php
- Create a sub site
- Visit sub site's Dashboard->Users->All Users, you will see the "Pending" link above the user list
- 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)
Change History (12)
#2
@
9 years ago
Hopefully yes, That condition can be simply substituted by
if( ! bp_core_do_network_admin() || is_network_admin() )
#3
@
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
@
9 years ago
- Keywords needs-patch added; has-patch needs-testing removed
Let's get the patch updated so we can test it.
#5
@
9 years ago
- Keywords has-patch added; needs-patch removed
Hi, Please find the updated patch with the recommended function by boonebgorges.
#6
@
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
@
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
@
9 years ago
- Keywords close added; has-patch removed
Ok, i think this behavior :
- 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)
We have a function
bp_core_do_network_admin()
that should be used here instead. imath, can you verify please?