Skip to content
Snippets Groups Projects
Commit 76e1438f authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

FIX REST api to get project when user has permission to read all.

parent f4cdb6b2
No related branches found
No related tags found
No related merge requests found
......@@ -372,7 +372,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh
$check = array('adherent','banque','user','usergroup','produit','service','produit|service','categorie'); // Test on entity only (Objects with no link to company)
$checksoc = array('societe'); // Test for societe object
$checkother = array('contact'); // Test on entity and link to societe. Allowed if link is empty (Ex: contacts...).
$checkproject = array('projet'); // Test for project object
$checkproject = array('projet','project'); // Test for project object
$nocheck = array('barcode','stock','fournisseur'); // No test
$checkdefault = 'all other not already defined'; // Test on entity and link to third party. Not allowed if link is empty (Ex: invoice, orders...).
......@@ -462,6 +462,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh
}
else
{
if ($dbtablename == 'project') $dbtablename='projet';
$sql = "SELECT dbt.".$dbt_select;
$sql.= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
$sql.= " WHERE dbt.".$dbt_select." = ".$objectid;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment