Changes between Version 1 and Version 2 of Ticket #7048, comment 13
- Timestamp:
- 01/03/2018 02:14:53 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #7048, comment 13
v1 v2 1 1 Looking 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. 2 2 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 preventa `true` we explicitly set earlier, but this would avoid that.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 so overwrite a `true` we explicitly set earlier, but this would avoid that. 4 4 5 5 And 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`.