| @@ -111,13 +111,16 @@ | ||
| 111 | 111 | $instance->register_routes(); |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | - * Check permissions for cache operations | |
| 115 | + * Cache management endpoints — gated on the settings cap. Cache | |
| 116 | + * flushes / regenerates are an operational task that fits the | |
| 117 | + * same risk profile as other settings changes. WP admins pass | |
| 118 | + * via the Team module's admin-fallback filter. | |
| 116 | 119 | */ |
| 117 | 120 | public function checkPermissions(): bool |
| 118 | 121 | { |
| 119 | - return current_user_can('manage_options'); | |
| 122 | + return current_user_can('yatra_manage_settings'); | |
| 120 | 123 | } |
| 121 | 124 | |
| 122 | 125 | /** |
| 123 | 126 | * Get cache statistics |