Jake Vanderwerf
2026-07-05 fff721dd185f5b97f7ae7a6e64189e55887ff590
inc/rest/PermissionHandler.php
@@ -30,23 +30,6 @@
         );
      }
      $requestedUserId = $request->get_param('user');
      // No user param specified - allow (controller will handle)
      if (empty($requestedUserId)) {
         return true;
      }
      $currentUserId = get_current_user_id();
      if ((int) $requestedUserId !== $currentUserId) {
         return new WP_Error(
            'forbidden',
            'You can only access your own resources',
            ['status' => 403]
         );
      }
      return true;
   }
@@ -348,8 +331,8 @@
    */
   public static function verifyActionNonce(WP_REST_Request $request, string $actionPrefix, string $header = 'X-Action-Nonce'): bool|WP_Error
   {
      $userId = absint($request->get_param('user'));
      if ($userId === 0) {
      $userId = get_current_user_id();
      if (!$userId) {
         return false;
      }