Commit 2caf51d37aeef1df8543b10c4338628c73c1e43b
1 parent
e8d5e2ef
only display groups in the current users unit
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1025 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
6 additions
and
1 deletions
presentation/lookAndFeel/knowledgeTree/foldermanagement/addFolderCollaborationUI.inc
| ... | ... | @@ -47,7 +47,12 @@ function getFolderPath($iFolderID) { |
| 47 | 47 | |
| 48 | 48 | function getGroupDropDown($iGroupID) { |
| 49 | 49 | global $default; |
| 50 | - $oPatternListBox = & new PatternListBox("$default->owl_groups_table", "name", "id", "fGroupID"); | |
| 50 | + if (Permission::userIsSystemAdministrator()) { | |
| 51 | + $oPatternListBox = & new PatternListBox("$default->owl_groups_table", "name", "id", "fGroupID"); | |
| 52 | + } else { | |
| 53 | + $oPatternListBox = & new PatternListBox("$default->owl_groups_table", "name", "id", "fGroupID", "GUL.unit_id=" . User::getUnitID($_SESSION["userID"])); | |
| 54 | + $oPatternListBox->setFromClause("INNER JOIN $default->owl_groups_units_table AS GUL ON ST.id = GUL.group_id"); | |
| 55 | + } | |
| 51 | 56 | $oPatternListBox->setEmptyErrorMessage("There are no groups"); |
| 52 | 57 | $oPatternListBox->setIncludeDefaultValue(false); |
| 53 | 58 | if (isset($iGroupID)) { | ... | ... |