Skip to:
Content

bbPress.org

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#2039 closed defect (bug) (fixed)

Undefined property $post_type->cap->read_private_forums

Reported by: kevinB Owned by:
Priority: high Milestone: 2.2.1
Component: API - Roles/Capabilities Version: 2.2
Severity: major 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
14 years ago

  • Component GeneralRoles/Capabilities
  • Milestone Awaiting Review2.2.1

#2 @johnjamesjacoby
14 years ago

  • Resolutionfixed
  • Status newclosed

(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
14 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
14 years ago

  • Cc kevinB added
  • Severity normalmajor

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 14 years ago by kevinB (previous) (diff)
Note: See TracTickets for help on using tickets.