Skip to content

Commit 4ba9baa

Browse files
fix: restrict chart creation wizard
1 parent 1be891c commit 4ba9baa

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

classes/Visualizer/Module/Chart.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,10 @@ private function deleteOldCharts() {
524524
* @access public
525525
*/
526526
public function renderChartPages() {
527+
if ( ! current_user_can( 'edit_posts' ) ) {
528+
wp_die( __( 'You do not have permission to access this page.', 'visualizer' ) );
529+
}
530+
527531
defined( 'IFRAME_REQUEST' ) || define( 'IFRAME_REQUEST', 1 );
528532
if ( ! defined( 'ET_BUILDER_PRODUCT_VERSION' ) && function_exists( 'et_get_theme_version' ) ) {
529533
define( 'ET_BUILDER_PRODUCT_VERSION', et_get_theme_version() );

0 commit comments

Comments
 (0)