is_action_allowed

Function is_action_allowed 

Source
pub fn is_action_allowed(
    permission_level: PermissionLevel,
    is_write_operation: bool,
) -> bool
Expand description

Return whether an action should be allowed for a session at the given permission level.

This helper exists for UI layers (CLI/GUI) that want to pre-flight an operation using a coarse “write vs read” flag.

The pipeline remains the source of truth for runtime enforcement; this function is a convenience wrapper around [PermissionLevel::blocks].