fix(window-state): missing `restore_state` and `filename` js binding permission (#1180)

* Fix js binding commands

* Re-run build

* Add change file
pull/1189/head
Tony 1 year ago committed by GitHub
parent c967307706
commit 1f9e7ab4a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
"window-state": patch
---
Fix `restore_window` and `filename` js binding missing permission

@ -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)

@ -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"]

@ -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"]

@ -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"]

@ -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.|

@ -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"
]
},
{

Loading…
Cancel
Save