cambiso en denuncias, mejoras de 30 min en inicio de sesion e incorporacion de grupos

Cambiso de certificado en registro de personal para aañadir el origen
This commit is contained in:
2026-07-27 08:46:41 +02:00
parent dd31460cf0
commit 6f9392f3d0
15 changed files with 624 additions and 64 deletions

View File

@@ -541,14 +541,13 @@ public sealed class InboxTrackingService : IInboxTrackingService
WHEN ir.owner_user_id IS NULL THEN 0
WHEN EXISTS (
SELECT 1
FROM app_user_groups current_group
INNER JOIN app_user_groups owner_group
ON owner_group.work_group_id = current_group.work_group_id
FROM app_user_groups shared_membership
INNER JOIN work_groups active_group
ON active_group.id = current_group.work_group_id
ON active_group.id = shared_membership.work_group_id
AND active_group.is_active = 1
WHERE current_group.app_user_id = @userId
AND owner_group.app_user_id = ir.owner_user_id
WHERE shared_membership.app_user_id IN (@userId, ir.owner_user_id)
GROUP BY shared_membership.work_group_id
HAVING COUNT(DISTINCT shared_membership.app_user_id) = 2
) THEN 1
ELSE 0
END AS accessible_by_group,