Will remove auto connected permissions (#1087)

This commit is contained in:
Raivis Dejus 2025-02-21 20:26:10 +02:00 committed by GitHub
commit ed54b94603
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 2 additions and 18 deletions

View file

@ -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

View file

@ -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:

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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
```
### 最新开发者版本