You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/plugin/opener.mdx
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,6 +115,10 @@ By default all potentially dangerous plugin commands and scopes are blocked and
115
115
116
116
See the [Capabilities Overview](/security/capabilities/) for more information and the [step by step guide](/learn/security/using-plugin-permissions/) to use plugin permissions.
117
117
118
+
Below are two example scope configurations. Both `path` and `url` use the [glob pattern syntax](https://docs.rs/glob/latest/glob/struct.Pattern.html) to define allowed file paths and URLs.
119
+
120
+
First, an example on how to add permissions to specific paths for the `openPath()` function:
@@ -127,11 +131,37 @@ See the [Capabilities Overview](/security/capabilities/) for more information an
127
131
"allow": [
128
132
{
129
133
"path": "/path/to/file"
134
+
},
135
+
{
136
+
"path": "$APPDATA/file"
130
137
}
131
138
]
132
139
}
133
140
]
134
141
}
135
142
```
136
143
144
+
Lastly, an example on how to add permissions for the exact `https://tauri.app` URL and all URLs on a custom protocol (must be known to the OS) for the `openUrl()` function:
0 commit comments