fix tenant scoping for group business tables
This commit is contained in:
@@ -5270,7 +5270,7 @@ func (a *adapter) TenantFileUserHasAccess(id t.TenantID, fid string, uid t.Uid)
|
||||
SELECT 1 FROM im_group_files AS gf
|
||||
INNER JOIN im_subscriptions AS s
|
||||
ON s.tenant_id=fu.tenant_id AND s.topic=gf.topic AND s.userid=?
|
||||
WHERE (gf.file_id=? OR gf.file_id LIKE CONCAT(?,'.%%')) AND gf.status='active'
|
||||
WHERE gf.tenant_id=fu.tenant_id AND (gf.file_id=? OR gf.file_id LIKE CONCAT(?,'.%%')) AND gf.status='active'
|
||||
AND s.deletedat IS NULL AND INSTR(s.modewant,'R')>0 AND INSTR(s.modegiven,'R')>0
|
||||
)
|
||||
) LIMIT 1`, tenantFriendshipsTable(id), tenantMessagesTable(id))),
|
||||
|
||||
Reference in New Issue
Block a user