From 34a80b2a592911ea99e3c48860297ceefbec2d75 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Tue, 2 Apr 2013 11:36:19 +0100 Subject: [PATCH] if current user cant add a post die --- bulk-entry.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bulk-entry.php b/bulk-entry.php index 51143b4..4616bcd 100644 --- a/bulk-entry.php +++ b/bulk-entry.php @@ -96,6 +96,11 @@ function get_editor_id() { } function wp_ajax_bulk_entry_submit_post() { + + if ( ! current_user_can( 'add_post' ) ) { + echo '{ "content" : "You don\'t have permission to do that"}'; + die(); + } $reply = $this->start_block( array( 'bulk-entry-notification' ) ); $reply .= $this->start_left_block(); $reply .= " ";