PluginProbe
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards / 5.5.85
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards v5.5.85
5.5.85 5.5.84 5.5.83 5.5.82 5.5.81 5.5.80 5.5.79 5.5.77 5.5.76 5.5.75 5.5.73 5.5.72 5.5.22 5.5.23 5.5.29 5.5.3 5.5.31 5.5.32 5.5.34 5.5.35 5.5.36 5.5.37 5.5.4 5.5.40 5.5.41 All 161 releases
← All changes | WPDataAccess/Simple_Form/WPDA_Simple_Form.php +8 -0 5.5.835.5.85 View file →
@@ -541,8 +541,12 @@
541 541 if ( !wp_verify_nonce( $wp_nonce, $this->get_nonce_action() ) ) {
542 542 wp_die( esc_attr__( 'ERROR: Not authorized', 'wp-data-access' ) );
543 543 }
544 544 if ( 'new' === $this->action ) {
545 + global $wpda_project_mode;
546 + if ( 'on' !== WPDA::get_option( WPDA::OPTION_BE_ALLOW_INSERT ) || isset( $wpda_project_mode['allow_insert'] ) && ('off' === $wpda_project_mode['allow_insert'] || 'only' === $wpda_project_mode['allow_insert']) ) {
547 + wp_die( esc_attr__( 'ERROR: Not authorized', 'wp-data-access' ) );
548 + }
545 549 // Prepare row and items for validation
546 550 $this->row = $this->row_data->new_row();
547 551 $this->prepare_items( true );
548 552 // Save new record.
@@ -568,8 +572,12 @@
568 572 $set_back_form_values = true;
569 573 }
570 574 }
571 575 } else {
576 + global $wpda_project_mode;
577 + if ( 'on' !== WPDA::get_option( WPDA::OPTION_BE_ALLOW_UPDATE ) && (isset( $wpda_project_mode['mode'] ) && 'edit' === $wpda_project_mode['mode']) ) {
578 + wp_die( esc_attr__( 'ERROR: Not authorized', 'wp-data-access' ) );
579 + }
572 580 // Prepare row and items for validation
573 581 $this->row = $this->row_data->get_row( $this->auto_increment_value, $this->wpda_err );
574 582 $this->prepare_items( true );
575 583 // Update existing record.