Do not display all project to a user if he has no rights for
_any_ project of the forge, but actually hide all... thanks to René Klomp for this finding!
This commit is contained in:
@@ -443,10 +443,12 @@ class IDF_Views
|
||||
}
|
||||
|
||||
$projectIds = self::getUserVisibleProjectIds($user);
|
||||
if (count($projectIds) > 0) {
|
||||
$sql->SAnd(new Pluf_SQL(sprintf($db->pfx.'idf_projects.id IN (%s)', implode(', ', $projectIds))));
|
||||
if (count($projectIds) == 0) {
|
||||
return new ArrayObject();
|
||||
}
|
||||
|
||||
$sql->SAnd(new Pluf_SQL(sprintf($db->pfx.'idf_projects.id IN (%s)', implode(', ', $projectIds))));
|
||||
|
||||
$orderTypes = array(
|
||||
'name' => 'name ASC',
|
||||
'activity' => 'value DESC, name ASC',
|
||||
@@ -470,10 +472,12 @@ class IDF_Views
|
||||
$sql = new Pluf_SQL('project IS NULL');
|
||||
|
||||
$projectIds = self::getUserVisibleProjectIds($user);
|
||||
if (count($projectIds) > 0) {
|
||||
$sql->SAnd(new Pluf_SQL(sprintf('idf_project_id IN (%s)', implode(', ', $projectIds))));
|
||||
if (count($projectIds) == 0) {
|
||||
return new ArrayObject();
|
||||
}
|
||||
|
||||
$sql->SAnd(new Pluf_SQL(sprintf('idf_project_id IN (%s)', implode(', ', $projectIds))));
|
||||
|
||||
$tagList = Pluf::factory('IDF_Tag')->getList(array(
|
||||
'filter' => $sql->gen(),
|
||||
'view' => 'join_projects',
|
||||
|
Reference in New Issue
Block a user