Opened 13 years ago
Closed 10 years ago
#21091 closed defect (bug) (duplicate)
Unable to upload media with custom permissions
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.4 |
Component: | Media | Keywords: | reporter-feedback close |
Focuses: | Cc: |
Description
on the current version of wp-admin/media-upload.php there are now several checks to ensure that the user can edit the post using current_user_can( 'edit_post', $_REQUESTpost_id? ). it appears that there is a typo as the capability as it is written currently is 'edit_post' and it should be 'edit_posts', correct?
I noticed this on a site I manage where contributors have been given the capability to upload media but are no longer able to unless media-upload.php is edited to match their built-in capability.
Change History (5)
#1
@
13 years ago
- Keywords reporter-feedback close added
- Summary changed from wp_capabilities typo? to Unable to upload media with custom permissions
#2
follow-up:
↓ 3
@
13 years ago
There is something weird going on. Just tried it myself. When a user doesn't have edit_post(s) capability and does upload a new media item it still breaks for HTML5 uploader. However it doesn't do that for the browser uploader
#3
in reply to:
↑ 2
@
13 years ago
Replying to markoheijnen:
When a user doesn't have edit_post(s) capability and does upload a new media item it still breaks for HTML5 uploader.
edit_post
is a meta capability which is translated into a concrete capability such asedit_posts
oredit_pubished_posts
by themap_meta_cap()
function.There's not enough information in this ticket to say for sure if this isn't a bug, but it sounds like your contributor with the custom capability is attempting to attach media to an already published post or some other post that they do not have sufficient capabilities to edit normally.