Update api/services/account_service.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Xiyuan Chen 2025-05-06 22:42:27 -04:00 committed by GitHub
parent 1e5bf958ec
commit 98e9cc5275
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -792,7 +792,7 @@ class TenantService:
if not ta_operator or ta_operator.role not in perms[action]:
raise NoPermissionError(f"No permission to {action} member.")
# Admin cannot remove or update other admin and the owner
# Restriction: Admins cannot remove or update other admins or the owner
if action in {"remove", "update"}:
if ta_operator.role == TenantAccountRole.ADMIN:
if member: