Skip to:
Content
Pages
Categories
Search
Top
Bottom

group superuser role


  • louie171
    Participant

    @louie171

    I’d like to create a new role group ‘superuser’

    I want to give this user some of the admin permissions (be able to change the group picture and things like that), however I don’t want the user to be able to touch things in the settings tab.

    I believe the buddypress group users aren’t WP roles, is there any docs or can anyone point me in the right direction as to how to have a play around with this.

Viewing 1 replies (of 1 total)
  • Hi @louie171,

    You are correct that group permissions are mostly independent of WP roles. The exception is that WP “administrators” can basically do everything that a group admin can do, but in any group. Site admins are always allowed to do things that are protected by this permissions check: bp_current_user_can( 'bp_moderate' ). This is not limited to the groups component, though.

    I’m not sure exactly how you’d accomplish what you’re wishing to do. You could filter the bp_current_user_can( 'bp_moderate' ) check to return true in the groups component for a certain role or set of users, and then remove admin tabs that you don’t want them to have access to, using code like this: https://codex.buddypress.org/developer/navigation-api/#remove-subnav-tabs-from-group-settings

    You’ll have to be careful to make sure you’re not allowing those users to do things you don’t want them to do.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar