Skip to main content

Signature

IPolicyRegistry.sol

Description

Returns whether account is authorized under policyId. Never reverts. Malformed ID — The invert flag (bit 63) is cleared before the type check. If the remaining top byte is outside the valid PolicyType range, the ID is malformed and the function returns false. Unknown ID (well-formed, not registered) — Treated as an empty member set: Invert — isAuthorized(invertedPolicyId(id), account) returns the negated result of the base policy when that base exists. Applies to every policy type. An inverted unknown or malformed base returns false.
Callers that store policy IDs MUST validate policyExists(policyId) at write time.

Parameters

Returns

bool — true if account is authorized under policyId, false otherwise.

Access Control

Read-only view function; no role restriction.

Policy Interaction

This is part of the singleton PolicyRegistry surface used by B20 policy scopes.

Example

Usage Example