Merge pull request #9019 from atm-gauthier/6.0_fix_getentity
FIX : getEntity project and not projet
This commit is contained in:
commit
bc632c9ab7
@ -1674,7 +1674,7 @@ class Project extends CommonObject
|
||||
// For external user, no check is done on company permission because readability is managed by public status of project and assignement.
|
||||
//if (! $user->rights->societe->client->voir && ! $socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid";
|
||||
$sql.= " WHERE p.fk_statut = 1";
|
||||
$sql.= " AND p.entity IN (".getEntity('project', 0).')';
|
||||
$sql.= " AND p.entity IN (".getEntity('project').')';
|
||||
if (! $user->rights->projet->all->lire) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||
// No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser
|
||||
//if ($socid || ! $user->rights->societe->client->voir) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||
@ -1750,7 +1750,7 @@ class Project extends CommonObject
|
||||
$sql = "SELECT count(p.rowid) as nb";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql.= " WHERE";
|
||||
$sql.= " p.entity IN (".getEntity('projet').")";
|
||||
$sql.= " p.entity IN (".getEntity('project').")";
|
||||
if (! $user->rights->projet->all->lire)
|
||||
{
|
||||
$projectsListId = $this->getProjectsAuthorizedForUser($user,0,1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user