Opened 13 months ago
Last modified 13 months ago
#20745 new defect (bug)
Hard-code less capability types
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Role/Capability | Version: | 3.0 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
We still hard-code some capability types thoughout the admin area.
For example edit_post is hard-coded as the edit attachment capability in the edit attachment pages. It should be pulled from the post type object instead so that it can be modified.
I've patched the ones I found.
Attachments (1)
Change History (4)
Viper007Bond
— 13 months ago
Note: See
TracTickets for help on using
tickets.
'edit_post' is a meta capability. In other words, the conversion you made in your patch is already done in map_meta_cap(). Same for 'delete_post' etc.