pub enum Preset {
DenyEverything,
ReadOnly,
ReadWrite,
FullDdl,
AllowEverything,
}Expand description
Predefined permission presets for common access control configurations.
Each variant maps to an AuthorizationResolver constructor that sets
sensible defaults for a particular use case. Variants are ordered from most
restrictive to least restrictive. The preset is selected via the --preset
CLI flag and determines the baseline permissions before any --allow /
--deny overrides are applied.
Variants§
DenyEverything
Denies all operations. Useful as a starting point when every permitted
action must be explicitly allowed via --allow flags.
ReadOnly
Allows reads, selects, transactions, SQL functions, recursive CTEs, and pragmas. Denies all data modification and DDL.
ReadWrite
Extends read-only with insert, update, delete, savepoints, analyze, reindex, and temporary object operations. Permanent DDL, attach, and detach remain denied.
FullDdl
Extends read-write with permanent DDL (create/drop tables, indexes, triggers, views, and alter table). Attach, detach, and virtual table operations remain denied.
AllowEverything
Allows all operations with no restrictions. Intended for development and testing only.
Trait Implementations§
Source§impl From<Preset> for AuthorizationResolver
Converts a Preset into the corresponding AuthorizationResolver by
calling the matching constructor.
impl From<Preset> for AuthorizationResolver
Converts a Preset into the corresponding AuthorizationResolver by
calling the matching constructor.