summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8aa84e1)
raw | patch | inline | side by side (parent: 8aa84e1)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 19 Jun 2008 11:21:31 +0000 (11:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 19 Jun 2008 11:21:31 +0000 (11:21 +0000) |
-Departments were only listed if we have full access.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11368 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11368 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/plugins/admin/acl/class_divListACL.inc b/gosa-core/plugins/admin/acl/class_divListACL.inc
index f1e92b2f9e2da4693cc17f75c8f2160569246dd8..dcf6b64989cd2d4e4b79af39efb87381fe62a47d 100644 (file)
function GenHeader()
{
- /* Prepare departments,
- which are shown in the listbox on top of the listbox
- */
- $options= "";
- $Copy_Paste = "";
-
/* Get all departments within this subtree */
$ui= get_userinfo();
- $first = "";
- $found = FALSE;
$base = $this->config->current['BASE'];
-
- /* Add base */
- $tmp = array();
- $tmp[] = array("dn"=>$this->config->current['BASE']);
- $tmp= array_merge($tmp,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
- array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH));
-
- $deps = array();
- foreach($tmp as $tm){
- $deps[$tm['dn']] = $tm['dn'];
- }
-
- /* Load possible departments */
- $ui= get_userinfo();
- $tdeps= $ui->get_module_departments("acl");
- $ids = $this->config->idepartments;
- $first = "";
- $found = FALSE;
- foreach($ids as $dep => $name){
- if(isset($deps[$dep]) && in_array_ics($dep, $tdeps)){
-
- /* Keep first base dn in mind, we could need this
- * info if no valid base was found
- */
- if(empty($first)) {
- $first = $dep['dn'];
- }
-
- $value = $ids[$dep];
- if ($this->selectedBase == $dep){
- $found = TRUE;
- $options.= "<option selected='selected' value='".$dep."'>$value</option>";
- } else {
- $options.= "<option value='".$dep."'>$value</option>";
- }
- }
- }
-
- /* The currently used base is not visible with your acl setup.
- * Set base to first useable base.
- */
- if(!$found){
- $this->selectedBase = $first;
- }
+ $options = $this->create_department_list($this->module);
/* Allow copy & paste for roles */
$acl_all = $ui->has_complete_category_acls($this->selectedBase,"acl");
diff --git a/gosa-core/plugins/admin/groups/class_divListGroup.inc b/gosa-core/plugins/admin/groups/class_divListGroup.inc
index aef9972756c1a8155b5e32f24d7b361a57301ea1..d47541f31cc47d72626c07c73ba2b35b1c64d971 100644 (file)
function GenHeader()
{
- /* Prepare departments,
- which are shown in the listbox on top of the listbox
- */
- $options= "";
-
-
-
/* Get all departments within this subtree */
$ui= get_userinfo();
$first = "";
$found = FALSE;
$base = $this->config->current['BASE'];
-
-
-
- /* Add base */
- $tmp = array();
- $tmp[] = array("dn"=>$this->config->current['BASE']);
- $tmp= array_merge($tmp,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
- array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH));
-
- $deps = array();
- foreach($tmp as $tm){
- $deps[$tm['dn']] = $tm['dn'];
- }
-
- /* Load possible departments */
- $ui= get_userinfo();
- $tdeps= $ui->get_module_departments("groups");
- $ids = $this->config->idepartments;
- $first = "";
- $found = FALSE;
- foreach($ids as $dep => $name){
- if(isset($deps[$dep]) && in_array_ics($dep, $tdeps)){
-
- /* Keep first base dn in mind, we could need this
- * info if no valid base was found
- */
- if(empty($first)) {
- $first = $dep['dn'];
- }
-
- $value = $ids[$dep];
- if ($this->selectedBase == $dep){
- $found = TRUE;
- $options.= "<option selected='selected' value='".$dep."'>$value</option>";
- } else {
- $options.= "<option value='".$dep."'>$value</option>";
- }
- }
- }
-
- /* The currently used base is not visible with your acl setup.
- * Set base to first useable base.
- */
- if(!$found){
- $this->selectedBase = $first;
- }
+ $options = $this->create_department_list($this->module);
/* Get acls */
$acl = $ui->get_permissions($this->selectedBase,"groups/group");
-
/* Add default header */
$listhead = MultiSelectWindow::get_default_header();
diff --git a/gosa-core/plugins/admin/ogroups/class_divListOGroup.inc b/gosa-core/plugins/admin/ogroups/class_divListOGroup.inc
index 424859bc1b2b36695129ea7c6a620cbfe99096e3..3e828b68f39a1150e2f29d6f2af0e41dd15933ce 100644 (file)
function GenHeader()
{
- /* Prepare departments,
- which are shown in the listbox on top of the listbox
- */
- $options= "";
-
/* Get all departments within this subtree */
$ui= get_userinfo();
$first = "";
$found = FALSE;
$base = $this->config->current['BASE'];
+ $options = $this->create_department_list($this->module);
/* Add base */
$tmp = array();
$tmp= array_merge($tmp,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH));
- $deps = array();
- foreach($tmp as $tm){
- $deps[$tm['dn']] = $tm['dn'];
- }
-
- /* Load possible departments */
- $ui= get_userinfo();
- $tdeps= $ui->get_module_departments("ogroups");
- $ids = $this->config->idepartments;
- $first = "";
- $found = FALSE;
- foreach($ids as $dep => $name){
- if(isset($deps[$dep]) && in_array_ics($dep, $tdeps)){
-
- /* Keep first base dn in mind, we could need this
- * info if no valid base was found
- */
- if(empty($first)) {
- $first = $dep['dn'];
- }
-
- $value = $ids[$dep];
- if ($this->selectedBase == $dep){
- $found = TRUE;
- $options.= "<option selected='selected' value='".$dep."'>$value</option>";
- } else {
- $options.= "<option value='".$dep."'>$value</option>";
- }
- }
- }
-
- /* The currently used base is not visible with your acl setup.
- * Set base to first useable base.
- */
- if(!$found){
- $this->selectedBase = $first;
- }
-
/* Add a seperator after displaying c&p and snapshot icons ? */
$add_sep = false;
diff --git a/gosa-core/plugins/admin/users/class_divListUsers.inc b/gosa-core/plugins/admin/users/class_divListUsers.inc
index 61aacad3f116284072940b636bc79d88275dd0b7..8541df4573c7c76e2628ab8a342d79a0d21b72ae 100644 (file)
function GenHeader()
{
- /* Prepare departments,
- which are shown in the listbox on top of the listbox
- */
- $options= "";
-
/* Get all departments within this subtree */
$base = $this->config->current['BASE'];
-
- /* Add base */
- $tmp = array();
- $tmp[] = array("dn"=>$this->config->current['BASE']);
- $tmp= array_merge($tmp,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
- array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH));
-
- $deps = array();
- foreach($tmp as $tm){
- $deps[$tm['dn']] = $tm['dn'];
- }
-
-
- /* Load possible departments */
- $ui= get_userinfo();
- $tdeps= $ui->get_module_departments("users");
- $ids = $this->config->idepartments;
- $first = "";
- $found = FALSE;
- foreach($ids as $dep => $name){
- if(isset($deps[$dep]) && in_array_ics($dep, $tdeps)){
-
- /* Keep first base dn in mind, we could need this
- * info if no valid base was found
- */
- if(empty($first)) {
- $first = $dep['dn'];
- }
-
- $value = $ids[$dep];
- if ($this->selectedBase == $dep){
- $found = TRUE;
- $options.= "<option selected='selected' value='".$dep."'>$value</option>";
- } else {
- $options.= "<option value='".$dep."'>$value</option>";
- }
- }
- }
-
- /* The currently used base is not visible with your acl setup.
- * Set base to first useable base.
- */
- if(!$found){
- $this->selectedBase = $first;
- }
+ $options = $this->create_department_list($this->module);
/* Get copy & paste icon */
+ $ui = get_userinfo();
$acl = $ui->get_permissions($this->selectedBase,"users/user");
$acl_all = $ui->has_complete_category_acls($this->selectedBase,"users");