mirror of
https://github.com/marcogll/telegram_expenses_controller.git
synced 2026-01-13 21:35:15 +00:00
feat: Implement core application structure, AI extraction, persistence, and Telegram bot modules with updated configuration and dependencies.
This commit is contained in:
20
app/permissions.py
Normal file
20
app/permissions.py
Normal file
@@ -0,0 +1,20 @@
|
||||
"""
|
||||
Handles user permissions and access control.
|
||||
|
||||
Defines who is allowed to perform certain actions, such as uploading
|
||||
or querying expense data.
|
||||
"""
|
||||
|
||||
from app.config import config
|
||||
|
||||
def is_user_allowed(user_id: str) -> bool:
|
||||
"""
|
||||
Checks if a given user ID is allowed to use the bot.
|
||||
|
||||
For now, this is a stub. A real implementation could check against
|
||||
a database of users or a predefined list in the config.
|
||||
"""
|
||||
# For example, you could have a comma-separated list of allowed IDs
|
||||
# ALLOWED_USERS = config.ALLOWED_USER_IDS.split(',')
|
||||
# return user_id in ALLOWED_USERS
|
||||
return True # Allow all users for now
|
||||
Reference in New Issue
Block a user