Include permissions info in backup files (#1116)
This commit is contained in:
parent
26dd0270d9
commit
c3e772fadc
@ -87,6 +87,7 @@ class BackupController {
|
|||||||
const optionsFull = await this._settingsController.getOptionsFull();
|
const optionsFull = await this._settingsController.getOptionsFull();
|
||||||
const environment = await api.getEnvironmentInfo();
|
const environment = await api.getEnvironmentInfo();
|
||||||
const fieldTemplatesDefault = await api.getDefaultAnkiFieldTemplates();
|
const fieldTemplatesDefault = await api.getDefaultAnkiFieldTemplates();
|
||||||
|
const permissions = await this._getPermissions();
|
||||||
|
|
||||||
// Format options
|
// Format options
|
||||||
for (const {options} of optionsFull.profiles) {
|
for (const {options} of optionsFull.profiles) {
|
||||||
@ -102,6 +103,7 @@ class BackupController {
|
|||||||
manifest: chrome.runtime.getManifest(),
|
manifest: chrome.runtime.getManifest(),
|
||||||
environment,
|
environment,
|
||||||
userAgent: navigator.userAgent,
|
userAgent: navigator.userAgent,
|
||||||
|
permissions,
|
||||||
options: optionsFull
|
options: optionsFull
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -165,6 +167,10 @@ class BackupController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_getPermissions() {
|
||||||
|
return new Promise((resolve) => chrome.permissions.getAll(resolve));
|
||||||
|
}
|
||||||
|
|
||||||
// Importing
|
// Importing
|
||||||
|
|
||||||
async _settingsImportSetOptionsFull(optionsFull) {
|
async _settingsImportSetOptionsFull(optionsFull) {
|
||||||
|
Loading…
Reference in New Issue
Block a user