From 455e3651b3a1c6ca86bea3a0a80ff395d2578113 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 23 Apr 2007 13:32:40 +0000 Subject: [PATCH] Use the first useable/available department as base for acl detection. If there was no valid base selected, the user-dn was used instead of the currently shown base. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6175 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/users/class_divListUsers.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc index e5cec852e..87ad2017a 100644 --- a/plugins/admin/users/class_divListUsers.inc +++ b/plugins/admin/users/class_divListUsers.inc @@ -94,16 +94,27 @@ class divListUsers extends MultiSelectWindow $ui= get_userinfo(); $tdeps= $ui->get_module_departments("users"); $ids = $this->config->idepartments; + $first = ""; + $found = FALSE; foreach($deps as $dep){ if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $tdeps)){ + + if(empty($first)) { + $first = $dep['dn']; + } + $value = $ids[$dep['dn']]; if ($this->selectedBase == $dep['dn']){ + $found = TRUE; $options.= ""; } else { $options.= ""; } } } + if(!$found){ + $this->selectedBase = $first; + } /* Get copy & paste icon */ $acl_all = $ui->has_complete_category_acls($this->selectedBase,"users") ; -- 2.30.2