Fix test on perm

This commit is contained in:
Laurent Destailleur 2021-03-19 13:28:04 +01:00
parent aef2f1713e
commit ff7f1feaae

View File

@ -133,7 +133,7 @@ if ($user->socid > 0) { // Protection if external user
}
// A non admin user can see profiles but limited to its own user
if (!$user->admin) {
if ($object->private != $user->id) {
if ($object->id > 0 && $object->private != $user->id) {
accessforbidden();
}
}