Skip to:
Content

bbPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#2039 closed defect (bug) (fixed)

Undefined property $post_type->cap->read_private_forums

Reported by: kevinb's profile kevinB Owned by:
Milestone: 2.2.1 Priority: high
Severity: major Version: 2.2
Component: API - Roles/Capabilities Keywords:
Cc: kevinB

Description

The following capability check in version 2.2 is not valid:

$caps = array( $post_type->cap->read_private_forums );

It should be:

$caps = array( $post_type->cap->read_private_posts );

This occurs in three functions:

  • bbp_map_forum_meta_caps
  • bbp_map_topic_meta_caps
  • bbp_map_reply_meta_caps

Change History (4)

#1 @johnjamesjacoby
13 years ago

  • Component changed from General to Roles/Capabilities
  • Milestone changed from Awaiting Review to 2.2.1

#2 @johnjamesjacoby
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4445]) Capabilities:

  • Map caps to read_private_posts in forum/topic/reply read_ checks.
  • Fixes debug notices and possible mapped caps from an unset object variable.
  • Fixes #2039 (2.2 branch)

#3 @johnjamesjacoby
13 years ago

(In [4446]) Capabilities:

  • Map caps to read_private_posts in forum/topic/reply read_ checks.
  • Fixes debug notices and possible mapped caps from an unset object variable.
  • Fixes #2039 (trunk)

#4 @kevinB
13 years ago

  • Cc kevinB added
  • Severity changed from normal to major

Thanks for the fix. Bumping up severity since this bug makes it impossible to grant read access to private forums due to a null value in the required caps array. Private forums are listed but access attempts fail the current_user_can() check.

Just an FYI in case this affects your 2.2.1 release timing decision or other diagnoses. Your patch comment made the symptoms sound kinda trivial or uncertain.

Last edited 13 years ago by kevinB (previous) (diff)
Note: See TracTickets for help on using tickets.