PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 4.0.5
Visualizer – Tables & Charts Manager with Built-in AI Generator v4.0.5
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | classes/Visualizer/Module/Chart.php +8 -0 4.0.34.0.5 View file →
@@ -169,8 +169,12 @@
169 169 */
170 170 public function getJsonRoots() {
171 171 check_ajax_referer( Visualizer_Plugin::ACTION_JSON_GET_ROOTS . Visualizer_Plugin::VERSION, 'security' );
172 172
173 + if ( ! current_user_can( 'edit_posts' ) ) {
174 + wp_send_json_error( array( 'msg' => esc_html__( 'You do not have permission to perform this action.', 'visualizer' ) ) );
175 + }
176 +
173 177 $params = wp_parse_args( $_POST['params'] );
174 178
175 179 $source = new Visualizer_Source_Json( $params );
176 180
@@ -190,8 +194,12 @@
190 194 * @access public
191 195 */
192 196 public function getJsonData() {
193 197 check_ajax_referer( Visualizer_Plugin::ACTION_JSON_GET_DATA . Visualizer_Plugin::VERSION, 'security' );
198 +
199 + if ( ! current_user_can( 'edit_posts' ) ) {
200 + wp_send_json_error( array( 'msg' => esc_html__( 'You do not have permission to perform this action.', 'visualizer' ) ) );
201 + }
194 202
195 203 $params = wp_parse_args( $_POST['params'] );
196 204
197 205 $chart_id = $params['chart'];