From 2caf51d37aeef1df8543b10c4338628c73c1e43b Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Fri, 21 Feb 2003 11:34:45 +0000 Subject: [PATCH] only display groups in the current users unit --- presentation/lookAndFeel/knowledgeTree/foldermanagement/addFolderCollaborationUI.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/presentation/lookAndFeel/knowledgeTree/foldermanagement/addFolderCollaborationUI.inc b/presentation/lookAndFeel/knowledgeTree/foldermanagement/addFolderCollaborationUI.inc index bde18b9..84a1a36 100644 --- a/presentation/lookAndFeel/knowledgeTree/foldermanagement/addFolderCollaborationUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/foldermanagement/addFolderCollaborationUI.inc @@ -47,7 +47,12 @@ function getFolderPath($iFolderID) { function getGroupDropDown($iGroupID) { global $default; - $oPatternListBox = & new PatternListBox("$default->owl_groups_table", "name", "id", "fGroupID"); + if (Permission::userIsSystemAdministrator()) { + $oPatternListBox = & new PatternListBox("$default->owl_groups_table", "name", "id", "fGroupID"); + } else { + $oPatternListBox = & new PatternListBox("$default->owl_groups_table", "name", "id", "fGroupID", "GUL.unit_id=" . User::getUnitID($_SESSION["userID"])); + $oPatternListBox->setFromClause("INNER JOIN $default->owl_groups_units_table AS GUL ON ST.id = GUL.group_id"); + } $oPatternListBox->setEmptyErrorMessage("There are no groups"); $oPatternListBox->setIncludeDefaultValue(false); if (isset($iGroupID)) { -- libgit2 0.21.4