PluginProbe
Yatra – Travel Booking & Tour Operator Software / trunk
Yatra – Travel Booking & Tour Operator Software vtrunk
3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 2.0.10 2.0.11 All 82 releases
← All changes | app/Controllers/NoticeController.php +9 -1 3.0.3trunk View file →
@@ -17,11 +17,19 @@
17 17 * @var string
18 18 */
19 19 protected string $rest_base = 'notices';
20 20
21 + /**
22 + * Admin-notice dismissal — gated on the umbrella admin-access
23 + * cap so any team member who can see the Yatra admin can dismiss
24 + * the notices they see. The legacy `manage_yatra` cap was never
25 + * registered anywhere, so the previous OR-arm did nothing in
26 + * practice. WP admins pass via the Team module's admin-fallback
27 + * filter.
28 + */
21 29 public function check_permission(?\WP_REST_Request $request = null): bool
22 30 {
23 - return current_user_can('manage_options') || current_user_can('manage_yatra');
31 + return current_user_can('yatra_access_admin');
24 32 }
25 33
26 34 public function register_routes(): void
27 35 {