Update task.class.php
This commit is contained in:
parent
9d6e93fd01
commit
3dfb22b05e
@ -1986,7 +1986,8 @@ class Task extends CommonObject
|
|||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
// For external user, no check is done on company because readability is managed by public status of project and assignement.
|
// For external user, no check is done on company because readability is managed by public status of project and assignement.
|
||||||
$socid = $user->socid;
|
//$socid = $user->socid;
|
||||||
|
$socid = 0;
|
||||||
|
|
||||||
$projectstatic = new Project($this->db);
|
$projectstatic = new Project($this->db);
|
||||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1, $socid);
|
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1, $socid);
|
||||||
@ -2007,10 +2008,7 @@ class Task extends CommonObject
|
|||||||
$sql .= " AND p.rowid IN (".$this->db->sanitize($projectsListId).")";
|
$sql .= " AND p.rowid IN (".$this->db->sanitize($projectsListId).")";
|
||||||
}
|
}
|
||||||
// No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser
|
// 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.")";
|
//if ($socid || ! $user->rights->societe->client->voir) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".((int) $socid).")";
|
||||||
if ($socid) {
|
|
||||||
$sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".((int) $socid).")";
|
|
||||||
}
|
|
||||||
// No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser
|
// No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser
|
||||||
// if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND ((s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id.") OR (s.rowid IS NULL))";
|
// if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND ((s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id.") OR (s.rowid IS NULL))";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user