diff --git a/services/tenant/app/api/tenants.py b/services/tenant/app/api/tenants.py index 5f680dfb..1d8beedb 100644 --- a/services/tenant/app/api/tenants.py +++ b/services/tenant/app/api/tenants.py @@ -51,6 +51,14 @@ async def verify_tenant_access( db: AsyncSession = Depends(get_db) ): """Verify if user has access to tenant - Called by Gateway""" + # Check if this is a service request + if user_id in ["training-service", "data-service", "forecasting-service"]: + # Services have access to all tenants for their operations + return TenantAccessResponse( + has_access=True, + role="service", + permissions=["read", "write"] + ) try: access_info = await TenantService.verify_user_access(user_id, tenant_id, db) diff --git a/services/training/app/services/date_alignment_service.py b/services/training/app/services/date_alignment_service.py index 3d860e78..1753ec4f 100644 --- a/services/training/app/services/date_alignment_service.py +++ b/services/training/app/services/date_alignment_service.py @@ -38,7 +38,7 @@ class DateAlignmentService: """ def __init__(self): - self.MAX_TRAINING_RANGE_DAYS = 365 # Maximum training data range + self.MAX_TRAINING_RANGE_DAYS = 730 # Maximum training data range self.MIN_TRAINING_RANGE_DAYS = 30 # Minimum viable training data def validate_and_align_dates(