mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Implement App-Scoped Security scoped bookmarks (#11711)
* implementation of security scoped bookmarks * option is now only available on mas builds
This commit is contained in:
committed by
shelley vohr
parent
9f78ef0179
commit
d1d50a4c92
@@ -50,8 +50,10 @@ The `dialog` module has the following methods:
|
||||
as a directory instead of a file.
|
||||
* `message` String (optional) _macOS_ - Message to display above input
|
||||
boxes.
|
||||
* `securityScopedBookmarks` _masOS_ _mas_ - Create [security scoped bookmarks](https://developer.apple.com/library/content/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW16) when packaged for the Mac App Store.
|
||||
* `callback` Function (optional)
|
||||
* `filePaths` String[] - An array of file paths chosen by the user
|
||||
* `bookmarks` String[] _macOS_ _mas_ - An array matching the `filePaths` array of base64 encoded strings which contains security scoped bookmark data. `securityScopedBookmarks` must be enabled for this to be populated.
|
||||
|
||||
Returns `String[]`, an array of file paths chosen by the user,
|
||||
if the callback is provided it returns `undefined`.
|
||||
@@ -99,8 +101,10 @@ shown.
|
||||
displayed in front of the filename text field.
|
||||
* `showsTagField` Boolean (optional) _macOS_ - Show the tags input box,
|
||||
defaults to `true`.
|
||||
* `securityScopedBookmarks` Boolean (optional) _masOS_ _mas_ - Create a [security scoped bookmark](https://developer.apple.com/library/content/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW16) when packaged for the Mac App Store. If this option is enabled and the file doesn't already exist a blank file will be created at the chosen path.
|
||||
* `callback` Function (optional)
|
||||
* `filename` String
|
||||
* `bookmark` String _macOS_ _mas_ - Base64 encoded string which contains the security scoped bookmark data for the saved file. `securityScopedBookmarks` must be enabled for this to be present.
|
||||
|
||||
Returns `String`, the path of the file chosen by the user,
|
||||
if a callback is provided it returns `undefined`.
|
||||
|
||||
Reference in New Issue
Block a user