chore: update project configuration and documentation
Some checks failed
CI / lint-and-test (push) Failing after 23s
Some checks failed
CI / lint-and-test (push) Failing after 23s
- Added *.egg-info/ to .gitignore to prevent egg metadata from being tracked. - Updated virtual environment instructions in CONTRIBUTING.md and README.md to use .venv for consistency. - Revised mkdocs.yml to include a placeholder for the repository URL when publishing. - Cleaned up pyproject.toml by removing unnecessary pylint configuration. - Enhanced import-format.md and runbook.md documentation for clarity on user roles and health check endpoints.
This commit is contained in:
@@ -147,7 +147,10 @@ def is_admin(username: str) -> bool:
|
||||
|
||||
|
||||
def can_access_miniapp(username: str) -> bool:
|
||||
"""Check if username is allowed to open the calendar Miniapp.
|
||||
"""Check if username is allowed to open the calendar Miniapp (env allowlist only).
|
||||
|
||||
Legacy: Miniapp access in production is determined by repository.can_access_miniapp_for_telegram_user
|
||||
(DB roles + fallback to ADMIN_*). This function is kept for tests and backward compatibility.
|
||||
|
||||
Args:
|
||||
username: Telegram username (with or without @; case-insensitive).
|
||||
@@ -160,7 +163,10 @@ def can_access_miniapp(username: str) -> bool:
|
||||
|
||||
|
||||
def can_access_miniapp_by_phone(phone: str | None) -> bool:
|
||||
"""Check if phone (set via /set_phone) is allowed to open the Miniapp.
|
||||
"""Check if phone (set via /set_phone) is allowed to open the Miniapp (env allowlist only).
|
||||
|
||||
Legacy: Miniapp access in production is determined by repository.can_access_miniapp_for_telegram_user
|
||||
(DB roles + fallback to ADMIN_*). This function is kept for tests and backward compatibility.
|
||||
|
||||
Args:
|
||||
phone: Raw phone string or None.
|
||||
|
||||
Reference in New Issue
Block a user