Test

Merged
SW
4mo ago
+83-14

Summary by cubic

Allow RECOUP_ORG admins to access any chat (read and write) by adding an admin bypass to validateChatAccess, with ownership checked first to avoid an extra lookup. Tests updated with admin scenarios and checkIsAdmin mocks.

  • New Features
    • validateChatAccess: owner gets access; if not owner, call checkIsAdmin and allow cross-account access when true; otherwise 403.
    • No account_id override is accepted; the chat owner is resolved from roomId only (aligns with chat#1811).

Summary by CodeRabbit

  • Refactor
    • Improved chat access validation logic with a streamlined permission verification flow for room owners and administrators.