[wp-trac] [WordPress Trac] #25255: Extend admin-ajax to detect multiple user capability and admin-ajax.php does not return 0
WordPress Trac
noreply at wordpress.org
Sun Sep 8 13:19:43 UTC 2013
#25255: Extend admin-ajax to detect multiple user capability and admin-ajax.php
does not return 0
---------------------------+------------------------------
Reporter: godhulii_1985 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.6
Severity: normal | Resolution:
Keywords: |
---------------------------+------------------------------
Comment (by markoheijnen):
The codex page http://codex.wordpress.org/AJAX_in_Plugins does describe
the need of die(). I don't think we should change to just die() when the
developer doesn't do it in their code. Main reason is that the code in
general is used for WordPress core itself. I do like the idea of a 404
header when you don't handle die() correctly.
Also I can see why we need to have an header included to a function like
wp_send_json_error() to a status code as 400.
I disagree on the part that WP should handle capabilities. Since basic
capability checks can be done but you can't map meta capabilities. Since
does do need to know more information like the 'edit_post' capability need
to know the post ID.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25255#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list