mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-21 08:51:24 +01:00
Fix compatibility with multicompany
This commit is contained in:
@@ -102,7 +102,7 @@ function dol_hash($chain,$type=0)
|
||||
* @param User $user User to check
|
||||
* @param string $features Features to check (it must be module name. Examples: 'societe', 'contact', 'produit&service', 'produit|service', ...)
|
||||
* @param int $objectid Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional).
|
||||
* @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity. Not used if objectid is null (optional)
|
||||
* @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany modume. Param not used if objectid is null (optional).
|
||||
* @param string $feature2 Feature to check, second level of permission (optional). Can be or check with 'level1|level2'.
|
||||
* @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional)
|
||||
* @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional)
|
||||
@@ -345,7 +345,7 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu
|
||||
* @param User $user User to check
|
||||
* @param array $featuresarray Features/modules to check. Example: ('user','service')
|
||||
* @param int $objectid Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional).
|
||||
* @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity. Not used if objectid is null (optional)
|
||||
* @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany modume. Param not used if objectid is null (optional).
|
||||
* @param string $feature2 Feature to check, second level of permission (optional). Can be or check with 'level1|level2'.
|
||||
* @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional)
|
||||
* @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional)
|
||||
|
||||
@@ -46,7 +46,7 @@ $confirm = GETPOST('confirm','alpha');
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'expensereport', $id, '');
|
||||
$result = restrictedArea($user, 'expensereport', $id, 'expensereport');
|
||||
|
||||
|
||||
// Get parameters
|
||||
|
||||
@@ -33,7 +33,7 @@ $langs->load("trips");
|
||||
// Security check
|
||||
$id = GETPOST('id','int');
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'expensereport', $id, '');
|
||||
$result = restrictedArea($user, 'expensereport', $id, 'expensereport');
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -42,7 +42,7 @@ $action=GETPOST('action','alpha');
|
||||
// Security check
|
||||
$socid=0;
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'expensereport',$id,'');
|
||||
$result=restrictedArea($user,'expensereport',$id,'expensereport');
|
||||
|
||||
|
||||
$object = new ExpenseReport($db);
|
||||
|
||||
Reference in New Issue
Block a user