Skip to:
Content

BuddyPress.org

Changes between Version 1 and Version 2 of Ticket #7048, comment 13


Ignore:
Timestamp:
01/03/2018 02:14:53 PM (22 months ago)
Author:
DJPaul
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7048, comment 13

    v1 v2  
    11Looking at the new function, I'm not sure the name "permalink access" is correct -- it's not specifically dealing with the permalink. Perhaps something like `bp_activity_user_can_read()`? Maybe @boonebgorges has an idea.
    22
    3 What do you think about moving the "If activity is from a group, do an extra cap check" underneath "If activity author match user, allow access as well", and add a check - e.g. `if ( ! $retval && bp_is_active( 'groups' ) && $activity->component === $bp->groups->id ) {` -- I'm not sure if ` $retval = $group->user_has_access; ` could ever be false and thus prevent a `true` we explicitly set earlier, but this would avoid that.
     3What do you think about moving the "If activity is from a group, do an extra cap check" underneath "If activity author match user, allow access as well", and add a check - e.g. `if ( ! $retval && bp_is_active( 'groups' ) && $activity->component === $bp->groups->id ) {` -- I'm not sure if ` $retval = $group->user_has_access; ` could ever be false and so overwrite a `true` we explicitly set earlier, but this would avoid that.
    44
    55And finally for the PHPDoc throughout, `$activity` is probably of type `BP_Activity_Activity` so we can use that to describe it instead of the more general `object`.