Expand description
Canonical Soma authorization scope constants.
Single source of truth for every scope name Soma issues or checks, and for
the write-implies-read satisfaction rule. Formerly split across
soma-contracts’ actions.rs (READ_SCOPE/WRITE_SCOPE/DENY_SCOPE/
scopes_satisfy) and scopes.rs (ADMIN_SCOPE/has_admin_scope);
merged here since they are the same invariant-value concept.
Constants§
- ADMIN_
SCOPE - Admin scope: grants administrative actions.
- DENY_
SCOPE - Sentinel scope no token can hold; assigned to unknown actions to deny them.
- READ_
SCOPE - Read scope: grants access to read-only actions.
- WRITE_
SCOPE - Write scope: grants mutating actions and satisfies
READ_SCOPE.
Functions§
- has_
admin_ scope - Returns true if
scopescontainsADMIN_SCOPE. - scopes_
satisfy - Returns true if
token_scopessatisfyrequired. Write scope satisfies read (write includes read). Single source of truth - called from both REST and MCP enforcement paths.