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

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/artifacts.js CHANGED
@@ -304,10 +304,10 @@ function evaluateOperationAuthority(granted, required, resolveSpace) {
304
304
  const canonicalRequired = canonicalizeOperationCapabilities(required, resolveSpace);
305
305
  const missing = [];
306
306
  for (const requested of canonicalRequired) {
307
- const covered = canonicalGranted.some(
308
- (candidate) => candidate.service === requested.service && operationSpacesEqual(candidate.space, requested.space) && isCapabilitySubset([requested], [candidate]).subset
307
+ const sameScope = canonicalGranted.filter(
308
+ (candidate) => candidate.service === requested.service && operationSpacesEqual(candidate.space, requested.space)
309
309
  );
310
- if (!covered) missing.push(requested);
310
+ if (!isCapabilitySubset([requested], sameScope).subset) missing.push(requested);
311
311
  }
312
312
  return {
313
313
  satisfied: missing.length === 0,