File tree Expand file tree Collapse file tree
classes/Visualizer/Module Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -365,11 +365,8 @@ public function uploadData(): void {
365365
366366 // ── Database query ────────────────────────────────────────────────
367367 case 'db_query ' :
368- if ( ! current_user_can ( 'administrator ' ) ) {
369- wp_send_json_error ( array ( 'message ' => __ ( 'Action not allowed for this user. ' , 'visualizer ' ) ) );
370- }
371- if ( ! is_super_admin () ) {
372- wp_send_json_error ( array ( 'message ' => __ ( 'Action not allowed for this user. ' , 'visualizer ' ) ) );
368+ if ( ! current_user_can ( 'manage_options ' ) && ! is_super_admin () ) {
369+ wp_send_json_error ( array ( 'message ' => __ ( 'Action not allowed for this user. ' , 'visualizer ' ) ), 403 );
373370 }
374371 if ( empty ( $ _POST ['db_query ' ] ) ) {
375372 wp_send_json_error ( array ( 'message ' => __ ( 'No query provided. ' , 'visualizer ' ) ) );
You can’t perform that action at this time.
0 commit comments