fmt
Some checks failed
Deploy on push / deploy (push) Failing after 3m38s

This commit is contained in:
2025-08-27 21:48:58 +03:00
parent f3fc6c34ae
commit 6a3862ad61
3 changed files with 10 additions and 3 deletions

View File

@@ -362,11 +362,11 @@ class AuthService:
if not author:
logger.warning(f"Пользователь {email} не найден")
return {"success": False, "token": None, "author": None, "error": "Пользователь не найден"}
# 🩵 Проверяем права с обработкой ошибок RBAC
is_admin_email = author.email in ADMIN_EMAILS.split(",")
has_reader_role = False
try:
user_roles = get_user_roles_in_community(int(author.id), community_id=1)
has_reader_role = "reader" in user_roles