[buddypress-trac] [BuddyPress Trac] #8550: "Invitations" tab visible to users when they're not able to send invitations.

buddypress-trac noreply at wordpress.org
Wed Nov 24 22:52:47 UTC 2021


#8550: "Invitations" tab visible to users when they're not able to send
invitations.
--------------------------+-----------------------
 Reporter:  niftythree    |       Owner:  dcavins
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  10.0.0
Component:  Groups        |     Version:  1.0
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+-----------------------
Changes (by imath):

 * keywords:  2nd-opinion => has-patch


Comment:

 @dcavins great idea about using a component feature for Group invitations
 👍.

 I think we don't need to introduce `bp_get_groups_invitations_allowed()`
 and we shouldn't use `bp_nouveau_..` functions into Core files.

 The invitations feature should only be added if the friends component is
 active. The Nouveau template pack can filter
 `bp_is_groups_invitations_active` to activate the Invitations feature if
 inviting any member is allowed (meaning
 `bp_nouveau_groups_disallow_all_members_invites` is not filtered to true).

 I've tested in legacy & nouveau and it works pretty well. I even tested
 using add_filter( `'bp_is_groups_invitations_active'`, `'__return_true' )`
 with Legacy and found a fatal into the send-invites template before fixing
 it.

 If you're ok with my suggestions, feel free to commit and fix the ticket
 ;)

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8550#comment:10>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list