Files
dolibarr/htdocs/comm
minimexat 2e02df9002 Fix external user 'Access Forbidden' on agenda event card (#37362)
External users (fk_soc set) were blocked from opening agenda events
because GETPOSTINT('socid') returns 0 when no socid param is in the URL
(ActionComm::getNomUrl() only generates ?id=XXXXX).

The condition 0 != $user->socid then triggers accessforbidden() for
every external user.

Fix: fall back to $user->socid when socid is not in the URL, consistent
with the pattern used in all other card pages (contracts, invoices,
orders, etc.).

The existing restrictedArea() check still validates that the event's
fk_soc matches the user's company, so security is preserved.

Fixes #37361

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-02-27 16:37:29 +01:00
..
2025-10-17 02:31:07 +02:00
2026-02-12 16:29:11 +01:00
2025-11-18 02:49:47 +01:00
2025-01-20 03:54:04 +01:00
2025-11-18 02:49:47 +01:00
2025-11-05 21:24:19 +01:00