Skip to content

Add encrypted multi-user server management#53

Merged
Opselon merged 2 commits intomainfrom
codex/improve-app-logic-and-add-multilingual-support
Nov 16, 2025
Merged

Add encrypted multi-user server management#53
Opselon merged 2 commits intomainfrom
codex/improve-app-logic-and-add-multilingual-support

Conversation

@Opselon
Copy link
Owner

@Opselon Opselon commented Nov 16, 2025

Summary

  • scope server records to each Telegram user, add plan-based limits, and encrypt stored secrets with a Fernet key
  • update the bot UI and localization so every add/remove server control is translated and available to non-admin users while still gating backups/updates to the primary admin
  • rework the SSH manager and database/tests to understand the new per-user APIs and ensure premium plans can register more servers safely

Testing

  • pytest tests/test_database.py tests/test_ssh_manager.py

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +306 to +309
else:
rows = conn.execute(
"SELECT * FROM servers WHERE owner_id = ? ORDER BY alias ASC",
(owner_id,),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Migrate existing servers to new owner_id scope

The new user scoping queries in get_all_servers now filter rows by owner_id, but initialize_database only adds the owner_id column with a default of 0 for pre‑existing tables and never backfills it to the current Telegram IDs. On upgrade, all legacy servers keep owner_id=0, so calls like connect_server_menu that pass the real user id will see an empty list and report “no servers configured” until every server is re‑added. A migration/backfill for existing rows (e.g., assigning them to the admin user) or a fallback when owner_id=0 is required to preserve existing servers.

Useful? React with 👍 / 👎.

@Opselon Opselon merged commit 3e4a02e into main Nov 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant