MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / propertyMatchesScope

Method propertyMatchesScope

server/src/validator.ts:458–472  ·  view source on GitHub ↗
(
    property: PropertyDefinition,
    normalizedDomain: string,
    scope: NormalizedScope
  )

Source from the content-addressed store, hash-verified

456 }
457
458 private propertyMatchesScope(
459 property: PropertyDefinition,
460 normalizedDomain: string,
461 scope: NormalizedScope
462 ): boolean {
463 if (scope.property_id) {
464 return property.property_id === scope.property_id;
465 }
466
467 if (scope.property_tags?.length) {
468 return this.hasIntersection(property.tags || [], scope.property_tags);
469 }
470
471 return this.propertyMatchesDomain(property, normalizedDomain);
472 }
473
474 private propertyMatchesDomain(property: PropertyDefinition, normalizedDomain: string): boolean {
475 if (property.publisher_domain && this.normalizeDomain(property.publisher_domain) === normalizedDomain) {

Callers 1

Calls 2

hasIntersectionMethod · 0.95
propertyMatchesDomainMethod · 0.95

Tested by

no test coverage detected