Skip to content

fix(dashboard): enforce tenant-scoped dashboard access and secure monthly summaries - #209

Open
etharrra wants to merge 1 commit into
Base360-AI:mainfrom
etharrra:main
Open

etharrra wants to merge 1 commit into
Base360-AI:mainfrom
etharrra:main

Conversation

@etharrra

Copy link
Copy Markdown

This change hardens the dashboard flow across the backend and frontend by enforcing tenant-aware access controls and improving data consistency for property and revenue queries.

Backend updates:

  • tighten tenant resolution and property access checks to prevent cross-tenant data leakage
  • scope dashboard property listings and summary queries to the active tenant
  • ensure monthly revenue aggregation respects local month boundaries and property ownership
  • validate single-currency totals for property-level reservation summaries
  • clear and refresh tenant-scoped cache entries when dashboard data changes
  • add integration coverage for property scoping, month-boundary logic, and cross-tenant access rejection

Frontend updates:

  • load dashboard properties dynamically from the authenticated API instead of relying on static mock data
  • add a month selector and default-to-latest-month behavior
  • pass the selected month through the summary component for accurate revenue filtering
  • show user-facing errors when the dashboard data cannot be loaded

Tests:

  • add end-to-end integration checks for seeded tenant data, cross-tenant isolation, and summary correctness across multiple months

This keeps the dashboard aligned with the tenant model, prevents unauthorized data access, and verifies the behavior with real API-level regression tests.

…thly summaries

This change hardens the dashboard flow across the backend and frontend by
enforcing tenant-aware access controls and improving data consistency for
property and revenue queries.

Backend updates:
- tighten tenant resolution and property access checks to prevent cross-tenant
  data leakage
- scope dashboard property listings and summary queries to the active tenant
- ensure monthly revenue aggregation respects local month boundaries and
  property ownership
- validate single-currency totals for property-level reservation summaries
- clear and refresh tenant-scoped cache entries when dashboard data changes
- add integration coverage for property scoping, month-boundary logic, and
  cross-tenant access rejection

Frontend updates:
- load dashboard properties dynamically from the authenticated API instead of
  relying on static mock data
- add a month selector and default-to-latest-month behavior
- pass the selected month through the summary component for accurate revenue
  filtering
- show user-facing errors when the dashboard data cannot be loaded

Tests:
- add end-to-end integration checks for seeded tenant data, cross-tenant
  isolation, and summary correctness across multiple months

This keeps the dashboard aligned with the tenant model, prevents unauthorized
data access, and verifies the behavior with real API-level regression tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant