PluginProbe
The Innovative Form Builder – IvyForms / 1.5.1
The Innovative Form Builder – IvyForms v1.5.1
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
← All changes | backend/src/Services/Preview/PreviewService.php +2 -1 1.1.1 → 1.5.1 View file →
@@ -4,8 +4,9 @@
4 4
5 5 use IvyForms\Common\Exceptions\ForbiddenException;
6 6 use IvyForms\Common\Sanitizer\Sanitizer;
7 7 use IvyForms\Services\API\IvyFormsAPI;
8 +use IvyForms\Services\Permissions\IvyFormsAccess;
8 9 use stdClass;
9 10 use WP_Post;
10 11
11 12 /**
@@ -102,9 +103,9 @@
102 103 403
103 104 );
104 105 }
105 106
106 - if (!current_user_can('manage_options')) {
107 + if (!IvyFormsAccess::canAccessFormPreview()) {
107 108 wp_die(
108 109 esc_html__('Sorry, you are not allowed to visit this preview form as this user.', 'ivyforms'),
109 110 esc_html__('You need a higher level of permission.', 'ivyforms'),
110 111 403