This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user