Fix getting tennat
This commit is contained in:
@@ -136,14 +136,6 @@ async def get_tenant_enhanced(
|
||||
tenant_service: EnhancedTenantService = Depends(get_enhanced_tenant_service)
|
||||
):
|
||||
"""Get tenant by ID with enhanced data and access control"""
|
||||
|
||||
# Verify user has access to tenant
|
||||
access = await tenant_service.verify_user_access(current_user["user_id"], str(tenant_id))
|
||||
if not access.has_access:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_403_FORBIDDEN,
|
||||
detail="Access denied to tenant"
|
||||
)
|
||||
|
||||
tenant = await tenant_service.get_tenant_by_id(str(tenant_id))
|
||||
if not tenant:
|
||||
|
||||
Reference in New Issue
Block a user