| @@ -93,9 +93,13 @@ | ||
| 93 | 93 | case 'PATCH': |
| 94 | 94 | case 'DELETE': |
| 95 | 95 | return current_user_can('yatra_edit_trips'); |
| 96 | 96 | default: |
| 97 | - return current_user_can('manage_options'); | |
| 97 | + // Unknown HTTP method — deny explicitly. The earlier | |
| 98 | + // fallback to `manage_options` was a regression that | |
| 99 | + // silently broadened admin-only access for any verb not | |
| 100 | + // in the explicit switch. | |
| 101 | + return false; | |
| 98 | 102 | } |
| 99 | 103 | } |
| 100 | 104 | |
| 101 | 105 | /** |