- commit
- b932f449ebc26cdf7c9432cdf6eaadf03cdee79b
- parent
- 8a24e97cbf51fe2002b61fef0dc30309c6c79b43
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2026-05-24 09:10
fixup d0e372a: rm TRUSTED_MANAGERS
Diffstat
| M | xikeyring/keyring.py | 11 | ++--------- |
1 files changed, 2 insertions, 9 deletions
diff --git a/xikeyring/keyring.py b/xikeyring/keyring.py
@@ -11,10 +11,6 @@ from . import crypto 11 11 from .kernel_keyring import KernelKey 12 12 from .prompt import PinentryPrompt as Prompt 13 1314 -1 TRUSTED_MANAGERS = [15 -1 '/usr/bin/seahorse',16 -1 ]17 -118 14 19 15 class AccessDeniedError(Exception): 20 16 pass @@ -125,15 +121,12 @@ class Keyring: 125 121 if not self.prompt.confirm(f'Allow {app_id or "host"} to make changes to your keyring?'): 126 122 raise AccessDeniedError 127 123128 -1 def has_access(self, app_id: str, item: Item) -> bool:129 -1 return item.app_id == app_id or app_id in TRUSTED_MANAGERS130 -1131 124 def get(self, items: dict[int, Item], app_id: str, id: int) -> Item: 132 125 try: 133 126 item = items[id] 134 127 except KeyError as e: 135 128 raise NotFoundError from e136 -1 if not self.has_access(app_id, item):-1 129 if item.app_id != app_id: 137 130 raise NotFoundError 138 131 return item 139 132 @@ -141,7 +134,7 @@ class Keyring: 141 134 items = self._read() 142 135 return [ 143 136 id for id, item in items.items()144 -1 if self.has_access(app_id, item) and all(-1 137 if item.app_id == app_id and all( 145 138 item.attributes.get(key) == value for key, value in query.items() 146 139 ) 147 140 ]