|
@@ -840,6 +840,11 @@ pub struct ShellAllowlistConfig {
|
|
/// Enable binary execution.
|
|
/// Enable binary execution.
|
|
#[serde(default)]
|
|
#[serde(default)]
|
|
pub execute: bool,
|
|
pub execute: bool,
|
|
|
|
+ /// Enable sidecar execution, allowing the JavaScript layer to spawn a sidecar program,
|
|
|
|
+ /// an executable that is shipped with the application.
|
|
|
|
+ /// For more information see https://tauri.studio/en/docs/usage/guides/bundler/sidecar.
|
|
|
|
+ #[serde(default)]
|
|
|
|
+ pub sidecar: bool,
|
|
/// Open URL with the user's default application.
|
|
/// Open URL with the user's default application.
|
|
#[serde(default)]
|
|
#[serde(default)]
|
|
pub open: bool,
|
|
pub open: bool,
|
|
@@ -850,6 +855,7 @@ impl Allowlist for ShellAllowlistConfig {
|
|
let allowlist = Self {
|
|
let allowlist = Self {
|
|
all: false,
|
|
all: false,
|
|
execute: true,
|
|
execute: true,
|
|
|
|
+ sidecar: true,
|
|
open: true,
|
|
open: true,
|
|
};
|
|
};
|
|
let mut features = allowlist.to_features();
|
|
let mut features = allowlist.to_features();
|
|
@@ -863,6 +869,7 @@ impl Allowlist for ShellAllowlistConfig {
|
|
} else {
|
|
} else {
|
|
let mut features = Vec::new();
|
|
let mut features = Vec::new();
|
|
check_feature!(self, features, execute, "shell-execute");
|
|
check_feature!(self, features, execute, "shell-execute");
|
|
|
|
+ check_feature!(self, features, sidecar, "shell-sidecar");
|
|
check_feature!(self, features, open, "shell-open");
|
|
check_feature!(self, features, open, "shell-open");
|
|
features
|
|
features
|
|
}
|
|
}
|