| @@ -108,8 +108,13 @@ | ||
| 108 | 108 | if ( $action !== $this->action_name ) { |
| 109 | 109 | return; |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | + // Bail if the current user cannot edit the Post being exported. | |
| 113 | + if ( ! current_user_can( 'edit_post', $post_id ) ) { | |
| 114 | + wp_die( esc_html__( 'Sorry, you are not allowed to export this Post.', 'convertkit' ) ); | |
| 115 | + } | |
| 116 | + | |
| 112 | 117 | // Export Post to a draft ConvertKit Broadcast. |
| 113 | 118 | $result = $this->export_post_to_broadcast( $post_id ); |
| 114 | 119 | |
| 115 | 120 | // If an error occurred, display an error message. |