Update note.php
This commit is contained in:
parent
a3315e8e16
commit
5e55bb20e3
@ -34,18 +34,22 @@ $action = GETPOST('action', 'aZ09');
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
// Security check
|
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
//if ($user->socid) {
|
|
||||||
// $id = $user->socid;
|
|
||||||
//}
|
|
||||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
|
|
||||||
|
|
||||||
$object = new Contact($db);
|
$object = new Contact($db);
|
||||||
if ($id > 0) {
|
if ($id > 0) {
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
if ($user->socid > 0) {
|
||||||
|
if ($object->fk_soc > 0 && $object->fk_soc != $user->socid) {
|
||||||
|
accessforbidden();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
|
||||||
|
|
||||||
|
|
||||||
$permissionnote = $user->rights->societe->creer; // Used by the include of actions_setnotes.inc.php
|
$permissionnote = $user->rights->societe->creer; // Used by the include of actions_setnotes.inc.php
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user