[wp-trac] [WordPress Trac] #22415: media-upload.php should check whether current user can edit a particular post type

WordPress Trac noreply at wordpress.org
Thu Nov 15 15:13:35 UTC 2012


#22415: media-upload.php should check whether current user can edit a particular
post type
-------------------------------+------------------------------
 Reporter:  danielbachhuber    |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Role/Capability    |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+------------------------------

Comment (by TXC):

 It seems it's typing error.
 Instead of:

 {{{
 if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' ,
 $_REQUEST['post_id'] )
 }}}
 it should be:

 {{{
 if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_posts' ,
 $_REQUEST['post_id'] )
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22415#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list