pub struct DotfileProtectionConfig {Show 14 fields
pub enabled: bool,
pub require_explicit_confirmation: bool,
pub audit_logging_enabled: bool,
pub audit_log_path: String,
pub prevent_cascading_modifications: bool,
pub create_backups: bool,
pub backup_directory: String,
pub max_backups_per_file: usize,
pub preserve_permissions: bool,
pub whitelist: IndexSet<String>,
pub additional_protected_patterns: Vec<String>,
pub block_during_automation: bool,
pub blocked_operations: Vec<String>,
pub require_secondary_auth_for_whitelist: bool,
}Expand description
Dotfile protection configuration.
Fields§
§enabled: boolEnable dotfile protection globally.
require_explicit_confirmation: boolRequire explicit user confirmation for any dotfile modification.
audit_logging_enabled: boolEnable immutable audit logging of all dotfile access attempts.
audit_log_path: StringPath to the audit log file.
prevent_cascading_modifications: boolPrevent cascading modifications (one dotfile change triggering others).
create_backups: boolCreate backup before any permitted modification.
backup_directory: StringDirectory for storing dotfile backups.
max_backups_per_file: usizeMaximum number of backups to retain per file.
preserve_permissions: boolPreserve original file permissions and ownership.
whitelist: IndexSet<String>Whitelisted dotfiles that can be modified (after secondary confirmation).
additional_protected_patterns: Vec<String>Additional dotfile patterns to protect (beyond defaults).
block_during_automation: boolBlock modifications during automated operations.
blocked_operations: Vec<String>Operations that trigger extra protection.
require_secondary_auth_for_whitelist: boolSecondary authentication required for whitelisted files.
Implementations§
Source§impl DotfileProtectionConfig
impl DotfileProtectionConfig
Sourcepub fn is_protected(&self, path: &str) -> bool
pub fn is_protected(&self, path: &str) -> bool
Check if a file path matches a protected dotfile pattern.
Sourcepub fn is_whitelisted(&self, path: &str) -> bool
pub fn is_whitelisted(&self, path: &str) -> bool
Check if a file is in the whitelist.
Trait Implementations§
Source§impl Clone for DotfileProtectionConfig
impl Clone for DotfileProtectionConfig
Source§fn clone(&self) -> DotfileProtectionConfig
fn clone(&self) -> DotfileProtectionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DotfileProtectionConfig
impl Debug for DotfileProtectionConfig
Source§impl Default for DotfileProtectionConfig
impl Default for DotfileProtectionConfig
Source§impl<'de> Deserialize<'de> for DotfileProtectionConfig
impl<'de> Deserialize<'de> for DotfileProtectionConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for DotfileProtectionConfig
impl JsonSchema for DotfileProtectionConfig
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more