[wp-trac] [WordPress Trac] #22711: Only show Delete in media modal if the user can delete

WordPress Trac noreply at wordpress.org
Tue Dec 4 06:21:14 UTC 2012


#22711: Only show Delete in media modal if the user can delete
------------------------------+------------------
 Reporter:  nacin             |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  3.5
Component:  Media             |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+------------------

Comment (by nacin):

 Did some testing for both editing and deleting as both an Administrator
 and an Author, as an Author is the lowest permission allowed. Looks like
 we can tighten the cap checks in some places (querying) and loosen them
 elsewhere (inserting).

 We need to make sure not to save an attachment when we're not allowed to,
 but still allow caption etc. to be edited before it gets inserted. Having
 split XHR handlers for save versus insert makes this particularly nice.
 [attachment:22711.2.diff]

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


More information about the wp-trac mailing list