Test
Merged
SW
4mo ago+83+83+01234567890123456789-14-14-01234567890123456789
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, callcheckIsAdminand allow cross-account access when true; otherwise 403.- No
account_idoverride is accepted; the chat owner is resolved fromroomIdonly (aligns with chat#1811).
Summary by CodeRabbit
- Refactor
- Improved chat access validation logic with a streamlined permission verification flow for room owners and administrators.