Table of Contents

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
Inheritance
CapabilityPattern
Inherited Members

Methods

IsWildcard(string)

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

public static bool IsWildcard(string capabilityId)

Parameters

capabilityId string

Returns

bool

Matches(string, string)

Whether a granted pattern authorizes a concrete required capability id.

public static bool Matches(string grantPattern, string requiredId)

Parameters

grantPattern string
requiredId string

Returns

bool