add auth validation to get tasks API

Merged
AR
7mo ago
+189-4

Summary by CodeRabbit

  • Bug Fixes
    • Strengthened authentication and authorization when fetching tasks to prevent unauthorized access.
    • Ensured account selection in task queries respects user permissions—admins can query other accounts; non-admins cannot override their account.
    • Made task query validation fully asynchronous so auth checks complete before tasks are processed.
    • Guaranteed task queries always include a resolved account identifier.