@tinycloud/operations 0.5.0-beta.6 → 0.5.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4107,10 +4107,10 @@ function evaluateOperationAuthority(granted, required, resolveSpace2) {
4107
4107
  const canonicalRequired = canonicalizeOperationCapabilities(required, resolveSpace2);
4108
4108
  const missing = [];
4109
4109
  for (const requested of canonicalRequired) {
4110
- const covered = canonicalGranted.some(
4111
- (candidate) => candidate.service === requested.service && operationSpacesEqual(candidate.space, requested.space) && isCapabilitySubset([requested], [candidate]).subset
4110
+ const sameScope = canonicalGranted.filter(
4111
+ (candidate) => candidate.service === requested.service && operationSpacesEqual(candidate.space, requested.space)
4112
4112
  );
4113
- if (!covered) missing.push(requested);
4113
+ if (!isCapabilitySubset([requested], sameScope).subset) missing.push(requested);
4114
4114
  }
4115
4115
  return {
4116
4116
  satisfied: missing.length === 0,