Skip to:
Content

BuddyPress.org

Changes between Initial Version and Version 1 of Ticket #8734, comment 27


Ignore:
Timestamp:
10/16/2022 02:24:13 PM (20 months ago)
Author:
imath
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #8734, comment 27

    initial v1  
    771. Being able to "bypass" the capability check. Context information are now sent and plugin authors can use it to decide whether they should bypass it or not. Here's a [https://github.com/buddypress/buddypress/pull/25/files#r996447311 code example] to allow the members directory to be viewable by any user.
    882. I've used @dcavins first idea about redirecting the user to the login page when the BP Theme or BP Template pack does not include the `members/gate.php` template. For this case, I've improved the `bp_core_no_access...` function so that it's possible to add an error message more suitable for the context. You can test this fallback activating BP Default or the BP Legacy template pack.
     9
     10@dcavins about your suggestion, I believe these caps should be dealt within the components classes, we could add a filter into the BP_Component class they are extending, this way, they'll be able to manage their specific contexts.