The delegate method was accepting any UUID as delegate_to without verifying the target user belongs to the same tenant. This allowed cross-tenant task delegation. Added raw SQL check against users table to avoid cross-module dependency on erp-auth.
The delegate method was accepting any UUID as delegate_to without verifying the target user belongs to the same tenant. This allowed cross-tenant task delegation. Added raw SQL check against users table to avoid cross-module dependency on erp-auth.