Skip to content
Snippets Groups Projects
Commit cc31da4d authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

bugfix(ajax): permission check

parent 436a297d
No related branches found
No related tags found
1 merge request!28bugfix(ajax): permission check
Pipeline #337402 failed
This commit is part of merge request !28. Comments created here will be created in the context of that merge request.
......@@ -79,7 +79,7 @@ class AjaxHandler implements HookablePluginDependant {
$noticeName = sanitize_text_field( $_POST[ self::POST_FIELD_NOTICE_NAME ] );
$option_name = PermanentDismissibleNotice::OPTION_NAME_PREFIX . $noticeName;
ajax_check_referer( $option_name, self::POST_FIELD_SECURITY );
\ajax_check_referer( $option_name, self::POST_FIELD_SECURITY );
if ( ! current_user_can( 'edit_posts' ) ) {
wp_send_json_error();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment