permissions API
Hint
The permissions API is inherited from Firefox, and its primary documentation is maintained by Mozilla at MDN. Thunderbird implements only the subset of functions, events, and types listed here. The MDN pages may provide further details and examples, but they may also reference features that are not supported in Thunderbird.
Functions
contains(permissions)
– [Added in TB 55]
Check if the extension has the given permissions.
getAll()
– [Added in TB 55]
Get a list of all the extension’s permissions.
remove(permissions)
– [Added in TB 55]
Relinquish the given permissions.
request(permissions)
– [Added in TB 55]
Request the given permissions.
Note
It’s not possible to request permissions from within DevTools (bug 1796933).
Note
Before version 101, permissions cannot be requested from a sidebar document (bug 1493396).
Note
Before version 75, permissions cannot be requested from popup panels (see bug 1432083).
Note
Before version 61, permissions cannot be requested from options pages embedded in about:addons (see bug 1382953).
Events
onAdded
– [Added in TB 77]
Fired when the extension acquires new permissions.
Parameters for onAdded.addListener(listener)
listener(permissions)
A function that will be called when this event occurs.
onRemoved
– [Added in TB 77]
Fired when permissions are removed from the extension.
Parameters for onRemoved.addListener(listener)
listener(permissions)
A function that will be called when this event occurs.
Types
AnyPermissions
object
data_collection
origins
permissions
CommonDataCollectionPermission
string
Supported values:
authenticationInfo
bookmarksInfo
browsingActivity
financialAndPaymentInfo
healthInfo
locationInfo
personalCommunications
personallyIdentifyingInfo
searchTerms
websiteActivity
websiteContent
MatchPattern
string
or
or
MatchPatternRestricted
Same as MatchPattern above, but excludes <all_urls>
string
or
string
MatchPatternUnestricted
Mostly unrestricted match patterns for privileged add-ons. This should technically be rejected for unprivileged add-ons, but, reasons. The MatchPattern class will still refuse privileged schemes for those extensions.
string
OptionalDataCollectionPermission
or
string
OptionalOnlyPermission
string
No supported values.
OptionalPermission
or
string
Supported values:
accountsFolders
accountsIdentities
accountsRead
addressBooks
browserSettings
browsingData
clipboardRead
clipboardWrite
compose
compose.save
compose.send
declarativeNetRequestFeedback
downloads
downloads.open
geolocation
management
messagesDelete
messagesImport
messagesModify
messagesModifyPermanent
messagesMove
messagesRead
messagesTags
messagesTagsList
messagesUpdate
messengerSettings
nativeMessaging
notifications
pkcs11
privacy
sensitiveDataUpload
sessions
tabs
webNavigation
OptionalPermissionNoPrompt
string
Permission
or
or
string
PermissionNoPrompt
or
or
string
Supported values:
alarms
contextualIdentities
declarativeNetRequestWithHostAccess
dns
identity
menus
storage
theme
unlimitedStorage
PermissionPrivileged
string
Permissions
– [Added in TB 55]
object
data_collection
origins
permissions