Changeset 3371428
- Timestamp:
- 10/01/2025 09:49:59 PM (6 months ago)
- Location:
- originality-ai/trunk
- Files:
-
- 4 edited
-
OriginalityAI.php (modified) (2 diffs)
-
OriginalityAIAdminUI.php (modified) (2 diffs)
-
originality-ai.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
originality-ai/trunk/OriginalityAI.php
r3370051 r3371428 562 562 check_ajax_referer('originalityai_delete_scan_nonce', 'nonce'); 563 563 564 // Check user permissions. 565 if (! current_user_can('manage_options')) { 566 wp_send_json_error(['message' => esc_html__('You do not have permission to perform this action.', 'originality-ai')], 403); 567 } 568 564 569 // Validate and sanitize scan ID. 565 570 $scan_id = isset($_POST['id']) ? intval($_POST['id']) : 0; … … 577 582 if (! $scan_entry) { 578 583 wp_send_json_error(['message' => esc_html__('Scan result not found.', 'originality-ai')], 404); 584 } 585 586 // Additional check: verify user can edit the post associated with this scan 587 if (isset($scan_entry['post_id']) && ! current_user_can('edit_post', $scan_entry['post_id'])) { 588 wp_send_json_error(['message' => esc_html__('You do not have permission to delete this scan result.', 'originality-ai')], 403); 579 589 } 580 590 -
originality-ai/trunk/OriginalityAIAdminUI.php
r3370051 r3371428 780 780 check_ajax_referer('bulk_scan_nonce', 'bulk_scan_nonce'); 781 781 782 // Check if the user has the capability to manage options.783 if (! current_user_can(' manage_options')) {782 // Check if the user has the capability to edit posts. 783 if (! current_user_can('edit_posts')) { 784 784 wp_send_json_error(['message' => 'You do not have sufficient permissions to access this page.']); 785 785 } … … 1103 1103 public static function ai_get_table_data() 1104 1104 { 1105 // Check if user is logged in. 1106 if (! is_user_logged_in()) { 1107 wp_send_json_error(['message' => 'Authentication required.'], 401); 1108 } 1109 1110 // Check user permissions - only users who can edit posts can view scan data. 1111 if (! current_user_can('edit_posts')) { 1112 wp_send_json_error(['message' => 'You do not have sufficient permissions.']); 1113 } 1114 1105 1115 $table_data = OriginalityAILogger::ai_get_table(); 1106 1116 wp_send_json($table_data); -
originality-ai/trunk/originality-ai.php
r3370051 r3371428 5 5 * Plugin URI: https://originality.ai/wordpress-plugin 6 6 * Description: Publish your content with integrity using Originality.ai - accurate AI Checker plugin! 7 * Version: 1.0.1 37 * Version: 1.0.14 8 8 * Author: Originality.ai 9 9 * Author URI: https://originality.ai/ 10 10 * Text Domain: originality-ai 11 * Stable tag: 1.0.1 311 * Stable tag: 1.0.14 12 12 * License: GPLv2 or later 13 13 … … 23 23 * Globals constants. 24 24 */ 25 define('ORIGINALITYAI_PLUGIN_VERSION', '1.0.1 3');25 define('ORIGINALITYAI_PLUGIN_VERSION', '1.0.14'); 26 26 define('ORIGINALITYAI_ROOT_PATH', plugin_dir_path(__FILE__)); 27 27 define('ORIGINALITYAI_ROOT_URL', plugin_dir_url(__FILE__)); -
originality-ai/trunk/readme.txt
r3370053 r3371428 4 4 Requires at least: 6.1 5 5 Tested up to: 6.8 6 version: 1.0.1 37 Stable tag: 1.0.1 36 version: 1.0.14 7 Stable tag: 1.0.14 8 8 Requires PHP: 7.4 9 9 Languages: English, Spanish, French, German, Portuguese, Italian, Russian, Chinese (Mandarin), Japanese, Turkish, Dutch, Greek, Polish, Vietnamese, Persian
Note: See TracChangeset
for help on using the changeset viewer.