From ed54b9460354f40bc04d4e769a48974d47284291 Mon Sep 17 00:00:00 2001 From: Raivis Dejus Date: Fri, 21 Feb 2025 20:26:10 +0200 Subject: [PATCH] Will remove auto connected permissions (#1087) --- README.md | 2 -- buzz/widgets/main_window.py | 10 ++-------- buzz/widgets/snap_notice.py | 2 -- docs/docs/installation.md | 2 -- .../current/installation.md | 2 -- readme/README.zh_CN.md | 2 -- 6 files changed, 2 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 9e5209c2..adb6371f 100644 --- a/README.md +++ b/README.md @@ -54,9 +54,7 @@ App is not signed, you will get a warning when you install it. Select `More info ```shell sudo apt-get install libportaudio2 libcanberra-gtk-module libcanberra-gtk3-module sudo snap install buzz -sudo snap connect buzz:audio-record sudo snap connect buzz:password-manager-service -sudo snap connect buzz:removable-media ``` ### Latest development version diff --git a/buzz/widgets/main_window.py b/buzz/widgets/main_window.py index 0619e3ce..75c5d69b 100644 --- a/buzz/widgets/main_window.py +++ b/buzz/widgets/main_window.py @@ -1,6 +1,5 @@ import os import logging -import sounddevice import keyring from typing import Tuple, List, Optional from uuid import UUID @@ -155,18 +154,13 @@ class MainWindow(QMainWindow): self.transcription_viewer_widget = None + # TODO Move this to the first user interaction with OpenAI api Key field + # that is the only place that needs access to password manager service if os.environ.get('SNAP_NAME', '') == 'buzz': logging.debug("Running in a snap environment") self.check_linux_permissions() def check_linux_permissions(self): - devices = sounddevice.query_devices() - input_devices = [device for device in devices if device['max_input_channels'] > 0] - - if len(input_devices) == 0: - snap_notice = SnapNotice(self) - snap_notice.show() - try: _ = keyring.get_password(APP_NAME, username="random") except Exception: diff --git a/buzz/widgets/snap_notice.py b/buzz/widgets/snap_notice.py index 26db6e7f..ea9dc5c9 100644 --- a/buzz/widgets/snap_notice.py +++ b/buzz/widgets/snap_notice.py @@ -18,9 +18,7 @@ class SnapNotice(QDialog): self.text_edit = QTextEdit(self) self.text_edit.setPlainText( - "sudo snap connect buzz:audio-record\n" "sudo snap connect buzz:password-manager-service\n" - "sudo snap connect buzz:removable-media" ) self.text_edit.setReadOnly(True) self.text_edit.setFixedHeight(80) diff --git a/docs/docs/installation.md b/docs/docs/installation.md index 7377761f..8ebf0b78 100644 --- a/docs/docs/installation.md +++ b/docs/docs/installation.md @@ -30,9 +30,7 @@ Download and run the `Buzz-x.y.z.exe` file. ```shell sudo apt-get install libportaudio2 libcanberra-gtk-module libcanberra-gtk3-module sudo snap install buzz -sudo snap connect buzz:audio-record sudo snap connect buzz:password-manager-service -sudo snap connect buzz:removable-media ``` [![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/buzz) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/installation.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/installation.md index ee3d3dad..2ce56a94 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/installation.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/installation.md @@ -27,9 +27,7 @@ brew install --cask buzz ```shell sudo apt-get install libportaudio2 libcanberra-gtk-module libcanberra-gtk3-module sudo snap install buzz -sudo snap connect buzz:audio-record sudo snap connect buzz:password-manager-service -sudo snap connect buzz:removable-media ``` [![从 Snap Store 获取](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/buzz) diff --git a/readme/README.zh_CN.md b/readme/README.zh_CN.md index ed9da2b4..a36d9f31 100644 --- a/readme/README.zh_CN.md +++ b/readme/README.zh_CN.md @@ -53,9 +53,7 @@ brew install --cask buzz ```shell sudo apt-get install libportaudio2 libcanberra-gtk-module libcanberra-gtk3-module sudo snap install buzz -sudo snap connect buzz:audio-record sudo snap connect buzz:password-manager-service -sudo snap connect buzz:removable-media ``` ### 最新开发者版本