Separate staff roles and protect message delivery with operator guides
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -11,18 +11,9 @@ from ..core.config import ADMIN_IDS
|
||||
|
||||
|
||||
async def setup_admin_users():
|
||||
"""Установить права администратора для пользователей из ADMIN_IDS"""
|
||||
if not ADMIN_IDS:
|
||||
print("❌ Список ADMIN_IDS пуст")
|
||||
return
|
||||
|
||||
async with async_session_maker() as session:
|
||||
for admin_id in ADMIN_IDS:
|
||||
success = await UserService.set_admin(session, admin_id, True)
|
||||
if success:
|
||||
print(f"✅ Права администратора установлены для ID: {admin_id}")
|
||||
else:
|
||||
print(f"⚠️ Пользователь с ID {admin_id} не найден в базе")
|
||||
"""Configured system admins already have access; never persist it as a second role."""
|
||||
print(f"System administrators are loaded directly from ADMIN_IDS ({len(ADMIN_IDS)} configured).")
|
||||
print("Use /staff in the bot to appoint ordinary administrators and cashiers.")
|
||||
|
||||
|
||||
async def create_sample_lottery():
|
||||
|
||||
Reference in New Issue
Block a user