[buddypress-trac] [BuddyPress Trac] #8734: Introduce simple "Private Site" toggle

buddypress-trac noreply at wordpress.org
Sun Oct 16 15:04:17 UTC 2022


#8734: Introduce simple "Private Site" toggle
-----------------------------+-----------------------
 Reporter:  dcavins          |       Owner:  (none)
     Type:  feature request  |      Status:  assigned
 Priority:  normal           |   Milestone:  11.0.0
Component:  Core             |     Version:  10.4.0
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |
-----------------------------+-----------------------

Comment (by johnjamesjacoby):

 > what if we add a context parameter to it so that you know which
 capability is being tested

 I think, the conventional way to do this, would be to invent a naming
 pattern for unique capability names, and map all of them down to `bp_read`
 via `map_meta_cap`: I.E.
 “prefix_verb_component_action_subaction(plurality)” =
 `bp_get_group_members_invites`

 In this way, the cap keys are registered, buildable, and predictable?

 Then, I think, anything that is considered “contextual” for the can either
 pass in a single ID or nothing, to continue to mimic WordPress and just
 about every other plugin, and would be accessible via some `bp()` value?

 (I’m guess, I am reluctant to introduce a ''totally'' new usage pattern
 into cap parameters, from a healthy fear of them being implemented in a
 way that allows members to access things they shouldn’t be able to.)

 Very open to feedback on these ideas. Never intending to halt progress.
 Only thinking out loud. 💕

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


More information about the buddypress-trac mailing list