Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions classes/Visualizer/Module/AIBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,12 @@ public function uploadData(): void {

// ── Database query ────────────────────────────────────────────────
case 'db_query':
if ( ! current_user_can( 'administrator' ) ) {
wp_send_json_error( array( 'message' => __( 'Action not allowed for this user.', 'visualizer' ) ) );
}
if ( ! is_super_admin() ) {
wp_send_json_error( array( 'message' => __( 'Action not allowed for this user.', 'visualizer' ) ) );
}
Comment thread
girishpanchal30 marked this conversation as resolved.
Outdated
if ( empty( $_POST['db_query'] ) ) {
wp_send_json_error( array( 'message' => __( 'No query provided.', 'visualizer' ) ) );
}
Expand Down
Loading