mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
block visibility to private contact (thirdparty list / card)
This commit is contained in:
parent
d3ccfeeadc
commit
f7adbfef16
|
|
@ -86,6 +86,7 @@ $hookmanager->initHooks(array('contactcard', 'globalcard'));
|
|||
|
||||
if ($id > 0) {
|
||||
$object->fetch($id);
|
||||
$object->info($id);
|
||||
}
|
||||
|
||||
if (!($object->id > 0) && $action == 'view') {
|
||||
|
|
@ -101,6 +102,9 @@ $permissiontoadd = $user->rights->societe->contact->creer;
|
|||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
if($object->priv && $object->user_creation->id != $user->id){
|
||||
accessforbidden();
|
||||
}
|
||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user