Skip to main content

is_scope_subset

Function is_scope_subset 

Source
pub fn is_scope_subset(
    child: &DelegationScope,
    parent: &DelegationScope,
) -> bool
Expand description

Checks if child scope is a subset of parent scope (no-amplification rule §9.6).

A child scope is a subset when:

  • Every action in child is present in parent (or parent has no actions, meaning wildcard)
  • Every resource in child is present in parent (or parent has no restrictions)
  • Every chain in child is present in parent (or parent has no restrictions)
  • Child limits are at least as restrictive as parent limits