REFACTOR - Database logic
This commit is contained in:
@@ -238,7 +238,7 @@ async def verify_tenant_access_dep(
|
||||
Raises:
|
||||
HTTPException: If user doesn't have access to tenant
|
||||
"""
|
||||
has_access = await tenant_access_manager.verify_user_tenant_access(current_user["user_id"], tenant_id)
|
||||
has_access = await tenant_access_manager.verify_basic_tenant_access(current_user["user_id"], tenant_id)
|
||||
if not has_access:
|
||||
logger.warning(f"Access denied to tenant",
|
||||
user_id=current_user["user_id"],
|
||||
@@ -276,7 +276,7 @@ async def verify_tenant_permission_dep(
|
||||
HTTPException: If user doesn't have access or permission
|
||||
"""
|
||||
# First verify basic tenant access
|
||||
has_access = await tenant_access_manager.verify_user_tenant_access(current_user["user_id"], tenant_id)
|
||||
has_access = await tenant_access_manager.verify_basic_tenant_access(current_user["user_id"], tenant_id)
|
||||
if not has_access:
|
||||
raise HTTPException(
|
||||
status_code=403,
|
||||
|
||||
Reference in New Issue
Block a user