From 1613aaee4d35ac3c2824e3cd85f52fe3917d3fc7 Mon Sep 17 00:00:00 2001 From: Hinton Date: Mon, 25 Jan 2021 13:25:27 +0100 Subject: [PATCH] Add entitlements to mac, disable browser integration on Windows Store --- resources/entitlements.mas.plist | 5 +++++ src/app/accounts/settings.component.ts | 9 +++++++++ src/locales/en/messages.json | 6 ++++++ 3 files changed, 20 insertions(+) diff --git a/resources/entitlements.mas.plist b/resources/entitlements.mas.plist index 38da9a97..7105330d 100644 --- a/resources/entitlements.mas.plist +++ b/resources/entitlements.mas.plist @@ -8,5 +8,10 @@ com.apple.security.files.user-selected.read-write + com.apple.security.temporary-exception.files.home-relative-path.read-write + + /Library/Application Support/Mozilla/NativeMessagingHosts/ + /Library/Application Support/Google/Chrome/NativeMessagingHosts/ + diff --git a/src/app/accounts/settings.component.ts b/src/app/accounts/settings.component.ts index c1b35241..28279334 100644 --- a/src/app/accounts/settings.component.ts +++ b/src/app/accounts/settings.component.ts @@ -23,6 +23,7 @@ import { ConstantsService } from 'jslib/services/constants.service'; import { ElectronConstants } from 'jslib/electron/electronConstants'; import { Utils } from 'jslib/misc/utils'; +import { isWindowsStore } from 'jslib/electron/utils'; @Component({ selector: 'app-settings', @@ -356,6 +357,14 @@ export class SettingsComponent implements OnInit { this.i18nService.t('browserIntegrationMasOnlyTitle'), this.i18nService.t('ok'), null, 'warning'); + this.enableBrowserIntegration = false; + return; + } else if (isWindowsStore()) { + await this.platformUtilsService.showDialog( + this.i18nService.t('browserIntegrationWindowsStoreDesc'), + this.i18nService.t('browserIntegrationWindowsStoreTitle'), + this.i18nService.t('ok'), null, 'warning'); + this.enableBrowserIntegration = false; return; } diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index dfedbdc5..1a7355bc 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -1462,6 +1462,12 @@ "browserIntegrationMasOnlyDesc": { "message": "Unfortunately browser integration is only supported in the Mac App Store version for now." }, + "browserIntegrationWindowsStoreTitle": { + "message": "Browser integration not supported" + }, + "browserIntegrationWindowsStoreDesc": { + "message": "Unfortunately browser integration is currently not supported in the Windows Store version." + }, "enableBrowserIntegrationFingerprint": { "message": "Require verification for browser integration" },