code: protected function authorizeRelationship(AuthorizerInterface $authorizer, $request, $record, string $field): void
      {
          if ($this->isModifyRelationship($request)) {
              $authorizer->modifyRelationship($record, $field, $request);
              return;
          }
  
          $authorizer->readRelationship($record, $field, $request);
      }
docs: Authorize a relationship request.
  
  @param AuthorizerInterface $authorizer
  @param $request
  @param $record
  @param string $field
  @throws AuthenticationException
  @throws AuthorizationException