Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.
Hello (again),
I've encountered the following problem with a user having "Project Leader" profile:
when checking the "projects" menu, even with the checkbox "show closed projects" enabled, the closed projects are not visible.
Using an profile with admin privileges, there is no issue.
Of course, I'm thinking this might be caused by some change made on the code within my organization, but I just wanted to make sure - is this behaviour correct for everyone else ? If it is, no need to worry about the following part of this message!
In case this is a problem for anyone else, here's my draft of a fix:
if ($objectClass=='Project' and $accessRightRead!='ALL') {
$accessRightRead='ALL';
$queryWhere.= ($queryWhere=='')?'':' and ';
$queryWhere.= '(' . $table . ".id in " . transformListIntoInClause($_SESSION['user']->getVisibleProjects()) ;
if ($objectClass=='Project') {
$queryWhere.= " or codeType='TMP' ";
}
$queryWhere.= ')';
}
This section is only parsed for a user who is not admin, and in the function getVisibleProjects() there is a call to getRecursiveSubProjectsFlatList(true).
With that 'true' parameter, the closed projects are not listed.
If using 'false' parameter, I do get correct behaviour.
But since this function is called in many different contexts, I'm not sure that will not introduce regressions, still need to test some more. Perhaps I'll add a parameter
to getVisibleProjects() to control this.
Hi,
Issue is confirmed.
You analysis is correct but fix a bit raw.
As you write, a new parameter must be added to getVisibleProjects().
This issue is recorded as Ticket #1182. It will be fixed in V3.5.0, with ticket #982 dealing witrh similar subject.