Skip to content

Class CapabilityPattern

Namespace: DotBoxD.Kernels.Policies
Assembly: DotBoxD.Kernels.dll

Hierarchical capability matching for dotted capability ids (e.g. game.world.monster.health.get). A grant may be a wildcard; a requirement is always a concrete id. A grant of game.world.monster. matches any required id under game.world.monster. (at least one further segment); a bare matches everything; otherwise matching is exact.

public static class CapabilityPattern

objectCapabilityPattern

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Whether a capability id is a wildcard pattern ( or ends with .).

public static bool IsWildcard(string capabilityId)

capabilityId string

bool

Whether a granted pattern authorizes a concrete required capability id.

public static bool Matches(string grantPattern, string requiredId)

grantPattern string

requiredId string

bool