Changeset 6830

Show
Ignore:
Timestamp:
02/13/08 23:16:11 (9 months ago)
Author:
ryan
Message:

Add capability check to async-upload. Props xknown. fixes #5848

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/async-upload.php

    r6659 r6830  
    1717 
    1818header('Content-Type: text/plain'); 
     19 
     20if ( !current_user_can('upload_files') ) 
     21    wp_die(__('You do not have permission to upload files.')); 
     22 
    1923$id = media_handle_upload('async-upload', $_REQUEST['post_id']); 
    2024if (is_wp_error($id)) {