mirror of
https://github.com/alexgetmancom/miband-bot.git
synced 2026-09-05 18:16:18 +03:00
fix: restrict env token bootstrapping to the primary user only
This commit is contained in:
@@ -67,7 +67,7 @@ async def run_sync(
|
||||
|
||||
async def _run_sync_locked(resolved_user_id: int, settings: Settings) -> SyncResult:
|
||||
token_path = settings.token_path(resolved_user_id)
|
||||
if not token_path.exists() and os.getenv("SSECURITY"):
|
||||
if not token_path.exists() and resolved_user_id == settings.telegram_allowed_user_id and os.getenv("SSECURITY"):
|
||||
_bootstrap_token_from_env(token_path)
|
||||
|
||||
if not token_path.exists():
|
||||
|
||||
Reference in New Issue
Block a user