Skip to content

Commit

Permalink
Merge pull request #9019 from atm-gauthier/6.0_fix_getentity
Browse files Browse the repository at this point in the history
FIX : getEntity project and not projet
  • Loading branch information
eldy committed Jun 29, 2018
2 parents a6c6bbe + d8ca9f2 commit bc632c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/projet/class/project.class.php
Expand Up @@ -1674,7 +1674,7 @@ function load_board($user)
// 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.")";
Expand Down Expand Up @@ -1750,7 +1750,7 @@ function load_state_board()
$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);
Expand Down

0 comments on commit bc632c9

Please sign in to comment.