summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eb71e34)
raw | patch | inline | side by side (parent: eb71e34)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 24 Apr 2007 05:44:56 +0000 (05:44 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 24 Apr 2007 05:44:56 +0000 (05:44 +0000) |
Set initial selectedBase to first available base, in header contruction.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6177 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6177 594d385d-05f5-0310-b6e9-bd551577e9d8
12 files changed:
index 62e81dbcd2fe8d37272b387e1a7b9dfa307885c5..ef54ec83f73fdb2f9fd7ac025d36325be673fad0 100644 (file)
{
/* New entry gets presets... */
if ($new){
- $this->aclType= 'base';
+ $this->aclType= 'sub';
$this->recipients= array();
$this->aclContents= array();
} else {
index 0507b7074d215abdef09a812b7ee7836475753b7..56fe9ae35a6626d23a1953af9f66c9060801248a 100644 (file)
$Copy_Paste = "";
/* Get all departments within this subtree */
+ $ui= get_userinfo();
+ $first = "";
+ $found = FALSE;
$base = $this->config->current['BASE'];
$deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", "acl", $base,
array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH);
$ids = $this->config->idepartments;
foreach($deps as $dep){
if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $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['dn']];
if ($this->selectedBase == $dep['dn']){
$options.= "<option selected='selected' value='".$dep['dn']."'>$value</option>";
}
}
+ /* The currently used base is not visible with your acl setup.
+ * Set base to first useable base.
+ */
+ if(!$found){
+ $this->selectedBase = $first;
+ }
+
/* Allow copy & paste for roles */
$acl_all = $ui->has_complete_category_acls($this->selectedBase,"acl");
$acl = $ui->get_permissions($this->selectedBase,"acl/acl");
diff --git a/plugins/admin/departments/class_divListDepartment.inc b/plugins/admin/departments/class_divListDepartment.inc
index 2b7f588621ee04fec436b003699bb777e06102e0..f8e56b0fa631b25a8511e0d42a91599a0d043313 100755 (executable)
$options= "";
/* Get all departments within this subtree */
+ $ui= get_userinfo();
+ $first = "";
+ $found = FALSE;
$base = $this->config->current['BASE'];
$deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH);
foreach($deps as $dep){
if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $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['dn']];
if ($this->selectedBase == $dep['dn']){
$options.= "<option selected='selected' value='".$dep['dn']."'>$value</option>";
}
}
+ /* The currently used base is not visible with your acl setup.
+ * Set base to first useable base.
+ */
+ if(!$found){
+ $this->selectedBase = $first;
+ }
/* Generate list head */
$ui = get_userinfo();
index 1a735a3a2f8aa1cf46a91276c59e6acc10c9951e..95e193f1dcb5805a76cefcb5ec537f56530e2c43 100644 (file)
$options= "";
/* Get all departments within this subtree */
+ $ui= get_userinfo();
+ $first = "";
+ $found = FALSE;
$base = $this->config->current['BASE'];
$deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH);
$ids = $this->config->idepartments;
foreach($deps as $dep){
if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $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['dn']];
if ($this->selectedBase == $dep['dn']){
$options.= "<option selected='selected' value='".$dep['dn']."'>$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 seperator */
$add_sep = false;
diff --git a/plugins/admin/groups/class_divListGroup.inc b/plugins/admin/groups/class_divListGroup.inc
index 518e36740b90c3ccc8cf1d7189665373edad52c9..a5056b283e7a6c6878f6ab9a0137f0c15550ca15 100644 (file)
/* Get all departments within this subtree */
+ $ui= get_userinfo();
+ $first = "";
+ $found = FALSE;
$base = $this->config->current['BASE'];
$deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH);
foreach($deps as $dep){
if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $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['dn']];
if ($this->selectedBase == $dep['dn']){
$options.= "<option selected='selected' value='".$dep['dn']."'>$value</option>";
}
}
+ /* The currently used base is not visible with your acl setup.
+ * Set base to first useable base.
+ */
+ if(!$found){
+ $this->selectedBase = $first;
+ }
+
/* Get acls */
$acls = $ui->get_permissions($this->selectedBase,"groups/group");
$acl_all= $ui->has_complete_category_acls($this->selectedBase,"groups");
diff --git a/plugins/admin/mimetypes/class_divListMimeTypes.inc b/plugins/admin/mimetypes/class_divListMimeTypes.inc
index 8fbd5c22519b90192f73c0e97d19b037b01ad610..cbda3fee7961756da002f92eb441d5d48498f6fe 100755 (executable)
$action_col_size += 38;
}
-
-
/* Toggle all selected / deselected */
$chk = "<input type='checkbox' id='select_all' name='select_all'
onClick='toggle_all_(\"^item_selected_[0-9]*$\",\"select_all\");' >";
$options= "";
/* Get all departments within this subtree */
+ $ui= get_userinfo();
+ $first = "";
+ $found = FALSE;
$base = $this->config->current['BASE'];
$deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH);
foreach($deps as $dep){
if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $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['dn']];
if ($this->selectedBase == $dep['dn']){
$options.= "<option selected='selected' value='".$dep['dn']."'>$value</option>";
}
}
+ /* The currently used base is not visible with your acl setup.
+ * Set base to first useable base.
+ */
+ if(!$found){
+ $this->selectedBase = $first;
+ }
+
/* Get acls */
$ui = get_userinfo();
$acl = $ui->get_permissions("cn=dummy,ou=mimetypes,".$this->selectedBase,"mimetypes/mimetype");
diff --git a/plugins/admin/ogroups/class_divListOGroup.inc b/plugins/admin/ogroups/class_divListOGroup.inc
index 5ac05bc7791c0596c10ad727188cb3e9bebe9a51..ed0e70025dce798bf04f3fb18ea1bc4573bad500 100755 (executable)
$options= "";
/* Get all departments within this subtree */
+ $ui= get_userinfo();
+ $first = "";
+ $found = FALSE;
$base = $this->config->current['BASE'];
$deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH);
foreach($deps as $dep){
if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $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['dn']];
if ($this->selectedBase == $dep['dn']){
$options.= "<option selected='selected' value='".$dep['dn']."'>$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/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc
index 5615a0bd2e96e3792b3f6cc3eb2ed0c81a9f23f4..a5bc398d632a2cb10f82c370f22dc1d46124d6e4 100644 (file)
/* Load possible departments */
$ui= get_userinfo();
+ $first = "";
+ $found = FALSE;
$department = $departments = array();
foreach($this->module as $module){
$d = $ui->get_module_departments($module);
foreach($deps as $dep){
if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $departments)){
+ /* 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['dn']];
if ($this->selectedBase == $dep['dn']){
$options.= "<option selected='selected' value='".$dep['dn']."'>$value</option>";
}
}
+ /* The currently used base is not visible with your acl setup.
+ * Set base to first useable base.
+ */
+ if(!$found){
+ $this->selectedBase = $first;
+ }
+
/* If there is at least one c (Create) and one w (Write) acl in this combination
display the snapshot paste icon. BUT check the correct acls in the management plugin */
$all_module_acls = "";
diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc
index 87ad2017afb63b07cc534772a62537c233e73cd0..ed888b8a0fe796e9488a63d44193b5252c8b1b0e 100644 (file)
foreach($deps as $dep){
if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $tdeps)){
+ /* Keep first base dn in mind, we could need this
+ * info if no valid base was found
+ */
if(empty($first)) {
$first = $dep['dn'];
}
}
}
}
+
+ /* The currently used base is not visible with your acl setup.
+ * Set base to first useable base.
+ */
if(!$found){
$this->selectedBase = $first;
}
diff --git a/plugins/gofax/blocklists/class_divListBlocklists.inc b/plugins/gofax/blocklists/class_divListBlocklists.inc
index 02c616324a8ca285fd80ee9b7d540145e65d01a2..27ff3d696a476087cada001da344b067fd4527b4 100755 (executable)
array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH);
/* Load possible departments */
+ $first = "";
+ $found = FALSE;
$ui= get_userinfo();
$tdeps= $ui->get_module_departments("gofaxlist");
$ids = $this->config->idepartments;
foreach($deps as $dep){
if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $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['dn']];
if ($this->selectedBase == $dep['dn']){
$options.= "<option selected='selected' value='".$dep['dn']."'>$value</option>";
}
}
+ /* The currently used base is not visible with your acl setup.
+ * Set base to first useable base.
+ */
+ if(!$found){
+ $this->selectedBase = $first;
+ }
+
/* Get acls */
$ui = get_userinfo();
$acl = $ui->get_permissions($this->selectedBase,"gofaxlist/blocklist");
diff --git a/plugins/gofon/conference/class_divListConferences.inc b/plugins/gofon/conference/class_divListConferences.inc
index 180cf03fd1403362768b0cb789a640260b746542..c16d99d4ef0e4bf3c953402512f158264f29cddf 100755 (executable)
/* Load possible departments */
$ui = get_userinfo();
+ $first = "";
+ $found = FALSE;
$tdeps = $ui->get_module_departments("gofonconference");
$ids = $this->config->idepartments;
foreach($deps as $dep){
if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $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['dn']];
if ($this->selectedBase == $dep['dn']){
$options.= "<option selected='selected' value='".$dep['dn']."'>$value</option>";
}
}
+ /* The currently used base is not visible with your acl setup.
+ * Set base to first useable base.
+ */
+ if(!$found){
+ $this->selectedBase = $first;
+ }
+
/* Get acls */
$acls = $ui->get_permissions($this->selectedBase,"gofonconference/conference");
$acl_all = $ui->has_complete_category_acls($this->selectedBase,"gofonconference") ;
diff --git a/plugins/gofon/macro/class_divListMacros.inc b/plugins/gofon/macro/class_divListMacros.inc
index d3712660b052f5545ee997596fc8a70e4ecea7e3..c759479a48a33f98785355a041c9c9526f17f049 100755 (executable)
/* Get all departments within this subtree */
$base = $this->config->current['BASE'];
+ $first = "";
+ $found = FALSE;
$deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH);
foreach($deps as $dep){
if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $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['dn']];
if ($this->selectedBase == $dep['dn']){
$options.= "<option selected='selected' value='".$dep['dn']."'>$value</option>";
}
}
+ /* The currently used base is not visible with your acl setup.
+ * Set base to first useable base.
+ */
+ if(!$found){
+ $this->selectedBase = $first;
+ }
+
$acls = $ui->get_permissions($this->selectedBase,"gofonmacro/macro");
/* Add default header */