#[non_exhaustive]pub struct ManagedSettingsPermissions {
pub disable_bypass_permissions_mode: Option<DisableBypassPermissionsMode>,
pub deny: Option<Vec<String>>,
pub ask: Option<Vec<String>>,
pub allow: Option<Vec<String>>,
}Expand description
Permission rules injected as a managed-settings layer at session bootstrap.
All fields are optional; an omitted field imposes no constraint from this
layer. This layer composes restrictively with any server- or device-level
managed settings: deny and ask rules are
unioned across layers, every present allow list must admit a
tool for it to be allowed, and
disable_bypass_permissions_mode is
honored if any layer sets it (deny-wins).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.disable_bypass_permissions_mode: Option<DisableBypassPermissionsMode>When set to "disable", bypass-permissions mode is turned off for the
session regardless of other layers. Serialized as
disableBypassPermissionsMode.
deny: Option<Vec<String>>Tool-permission patterns that are always denied.
ask: Option<Vec<String>>Tool-permission patterns that require an explicit ask.
allow: Option<Vec<String>>Tool-permission patterns that are allowed without prompting.
Implementations§
Source§impl ManagedSettingsPermissions
impl ManagedSettingsPermissions
Sourcepub fn with_disable_bypass_permissions_mode(
self,
value: DisableBypassPermissionsMode,
) -> Self
pub fn with_disable_bypass_permissions_mode( self, value: DisableBypassPermissionsMode, ) -> Self
Sets the bypass-permissions policy for this managed layer.
Sourcepub fn with_ask(self, rules: Vec<String>) -> Self
pub fn with_ask(self, rules: Vec<String>) -> Self
Sets the rules that require explicit approval.
Sourcepub fn with_allow(self, rules: Vec<String>) -> Self
pub fn with_allow(self, rules: Vec<String>) -> Self
Sets the rules that are allowed without prompting.
Trait Implementations§
Source§impl Clone for ManagedSettingsPermissions
impl Clone for ManagedSettingsPermissions
Source§fn clone(&self) -> ManagedSettingsPermissions
fn clone(&self) -> ManagedSettingsPermissions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more