diff --git a/.changes/window-state-js-binding.md b/.changes/window-state-js-binding.md new file mode 100644 index 00000000..7848e6b1 --- /dev/null +++ b/.changes/window-state-js-binding.md @@ -0,0 +1,5 @@ +--- +"window-state": patch +--- + +Fix `restore_window` and `filename` js binding missing permission diff --git a/plugins/window-state/build.rs b/plugins/window-state/build.rs index 5940f680..2a9354c9 100644 --- a/plugins/window-state/build.rs +++ b/plugins/window-state/build.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -const COMMANDS: &[&str] = &["save_window_state", "restore_window_state"]; +const COMMANDS: &[&str] = &["save_window_state", "restore_state", "filename"]; fn main() { tauri_plugin::Builder::new(COMMANDS) diff --git a/plugins/window-state/permissions/autogenerated/commands/filename.toml b/plugins/window-state/permissions/autogenerated/commands/filename.toml new file mode 100644 index 00000000..1cfcee45 --- /dev/null +++ b/plugins/window-state/permissions/autogenerated/commands/filename.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-filename" +description = "Enables the filename command without any pre-configured scope." +commands.allow = ["filename"] + +[[permission]] +identifier = "deny-filename" +description = "Denies the filename command without any pre-configured scope." +commands.deny = ["filename"] diff --git a/plugins/window-state/permissions/autogenerated/commands/restore_state.toml b/plugins/window-state/permissions/autogenerated/commands/restore_state.toml new file mode 100644 index 00000000..61df5cd4 --- /dev/null +++ b/plugins/window-state/permissions/autogenerated/commands/restore_state.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-restore-state" +description = "Enables the restore_state command without any pre-configured scope." +commands.allow = ["restore_state"] + +[[permission]] +identifier = "deny-restore-state" +description = "Denies the restore_state command without any pre-configured scope." +commands.deny = ["restore_state"] diff --git a/plugins/window-state/permissions/autogenerated/commands/restore_window_state.toml b/plugins/window-state/permissions/autogenerated/commands/restore_window_state.toml deleted file mode 100644 index 07fa8bb2..00000000 --- a/plugins/window-state/permissions/autogenerated/commands/restore_window_state.toml +++ /dev/null @@ -1,13 +0,0 @@ -# Automatically generated - DO NOT EDIT! - -"$schema" = "../../schemas/schema.json" - -[[permission]] -identifier = "allow-restore-window-state" -description = "Enables the restore_window_state command without any pre-configured scope." -commands.allow = ["restore_window_state"] - -[[permission]] -identifier = "deny-restore-window-state" -description = "Denies the restore_window_state command without any pre-configured scope." -commands.deny = ["restore_window_state"] diff --git a/plugins/window-state/permissions/autogenerated/reference.md b/plugins/window-state/permissions/autogenerated/reference.md index fca68efd..22790617 100644 --- a/plugins/window-state/permissions/autogenerated/reference.md +++ b/plugins/window-state/permissions/autogenerated/reference.md @@ -1,6 +1,8 @@ | Permission | Description | |------|-----| -|`allow-restore-window-state`|Enables the restore_window_state command without any pre-configured scope.| -|`deny-restore-window-state`|Denies the restore_window_state command without any pre-configured scope.| +|`allow-filename`|Enables the filename command without any pre-configured scope.| +|`deny-filename`|Denies the filename command without any pre-configured scope.| +|`allow-restore-state`|Enables the restore_state command without any pre-configured scope.| +|`deny-restore-state`|Denies the restore_state command without any pre-configured scope.| |`allow-save-window-state`|Enables the save_window_state command without any pre-configured scope.| |`deny-save-window-state`|Denies the save_window_state command without any pre-configured scope.| diff --git a/plugins/window-state/permissions/schemas/schema.json b/plugins/window-state/permissions/schemas/schema.json index dfac5b52..b0ab7f52 100644 --- a/plugins/window-state/permissions/schemas/schema.json +++ b/plugins/window-state/permissions/schemas/schema.json @@ -295,17 +295,31 @@ "type": "string", "oneOf": [ { - "description": "allow-restore-window-state -> Enables the restore_window_state command without any pre-configured scope.", + "description": "allow-filename -> Enables the filename command without any pre-configured scope.", "type": "string", "enum": [ - "allow-restore-window-state" + "allow-filename" ] }, { - "description": "deny-restore-window-state -> Denies the restore_window_state command without any pre-configured scope.", + "description": "deny-filename -> Denies the filename command without any pre-configured scope.", "type": "string", "enum": [ - "deny-restore-window-state" + "deny-filename" + ] + }, + { + "description": "allow-restore-state -> Enables the restore_state command without any pre-configured scope.", + "type": "string", + "enum": [ + "allow-restore-state" + ] + }, + { + "description": "deny-restore-state -> Denies the restore_state command without any pre-configured scope.", + "type": "string", + "enum": [ + "deny-restore-state" ] }, {