Changeset 7350 for trunk/src/includes/replies/capabilities.php
- Timestamp:
- 08/15/2025 05:18:54 PM (7 months ago)
- File:
-
- 1 edited
-
trunk/src/includes/replies/capabilities.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/replies/capabilities.php
r6975 r7350 52 52 53 53 // User cannot spectate 54 if ( ! user_can( $user_id, 'spectate' ) ) {54 if ( ! user_can( $user_id, 'spectate' ) && ! bbp_is_anonymous() ) { 55 55 $caps = array( 'do_not_allow' ); 56 56 … … 72 72 // Post is public 73 73 if ( bbp_get_public_status_id() === $_post->post_status ) { 74 $caps = array( 'spectate' ); 74 75 // Anonymous users do not have caps, but can 'exist' 76 if ( bbp_is_anonymous() ) { 77 $caps = array( 'exist' ); 78 79 // Registered users need the 'spectate' cap 80 } else { 81 $caps = array( 'spectate' ); 82 } 75 83 76 84 // User is author so allow read
Note: See TracChangeset
for help on using the changeset viewer.