Bug 1613562 - Add a permission for modifying draft messages. r=mkmelin

--HG--
extra : rebase_source : 46e57da516b89bf5a33395f7ba7bdf82a6cfa2fc
This commit is contained in:
Geoff Lankow 2020-02-06 15:26:19 +13:00
Родитель a9f8ad2fd2
Коммит 3721fdb098
4 изменённых файлов: 30 добавлений и 2 удалений

Просмотреть файл

@ -1,4 +1,20 @@
[
{
"namespace": "manifest",
"types": [
{
"$extend": "OptionalPermission",
"choices": [
{
"type": "string",
"enum": [
"compose"
]
}
]
}
]
},
{
"namespace": "compose",
"types": [
@ -100,6 +116,9 @@
"name": "onBeforeSend",
"type": "function",
"description": "Fired when a message is about to be sent from the compose window.",
"permissions": [
"compose"
],
"parameters": [
{
"name": "details",
@ -192,6 +211,9 @@
"type": "function",
"async": true,
"description": "Fetches the current state of a compose window. Currently only a limited amount of information is available, more will be added in later versions.",
"permissions": [
"compose"
],
"parameters": [
{
"type": "integer",
@ -205,6 +227,9 @@
"type": "function",
"async": true,
"description": "Updates the compose window. Specify only fields that you want to change. Currently only the to/cc/bcc/replyTo/followupTo/newsgroups fields and the subject are implemented.",
"permissions": [
"compose"
],
"parameters": [
{
"type": "integer",

Просмотреть файл

@ -239,7 +239,9 @@ add_task(async () => {
await browser.addressBooks.delete(addressBook);
browser.test.notifyPass("finished");
},
manifest: { permissions: ["accountsRead", "addressBooks", "messagesRead"] },
manifest: {
permissions: ["accountsRead", "addressBooks", "compose", "messagesRead"],
},
});
extension.onMessage("checkWindow", async expected => {

Просмотреть файл

@ -172,7 +172,7 @@ add_task(async () => {
browser.test.notifyPass("finished");
},
manifest: { permissions: ["accountsRead", "messagesRead"] },
manifest: { permissions: ["accountsRead", "compose", "messagesRead"] },
});
// We can't allow sending to actually happen, this is a test. For every

Просмотреть файл

@ -158,6 +158,7 @@ webextPerms.description.browserSettings=Read and modify browser settings
webextPerms.description.browsingData=Clear recent browsing history, cookies, and related data
webextPerms.description.clipboardRead=Get data from the clipboard
webextPerms.description.clipboardWrite=Input data to the clipboard
webextPerms.description.compose=Read and modify your email messages as you compose and send them
webextPerms.description.devtools=Extend developer tools to access your data in open tabs
webextPerms.description.dns=Access IP address and hostname information
webextPerms.description.downloads=Download files and read and modify the browsers download history