summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 50b5156)
raw | patch | inline | side by side (parent: 50b5156)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 27 Feb 2006 08:26:27 +0000 (08:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 27 Feb 2006 08:26:27 +0000 (08:26 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2745 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_baseSelectDialog.inc | patch | blob | history | |
plugins/personal/generic/class_user.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_baseSelectDialog.inc b/plugins/admin/systems/class_baseSelectDialog.inc
index d91da77aa904a8846eec68756233bb2698bacba8..9db43a10292897c6d30b79ad993bf54e48949493 100644 (file)
// var $Doesnothing = ""; // Checkbox which does nothing
var $selectedBase = false; // used to specify the selected base,
- // false if none is selected
- function baseSelectDialog ($config)
+ // false if none is selected
+
+ var $allowedBases = array();
+
+ function baseSelectDialog ($config,$onlyAllowThisBases = array())
{
MultiSelectWindow::MultiSelectWindow($config);
$this->selected_base = $config->current['BASE'];
+ $this->allowedBases = $onlyAllowThisBases;
+
$this->SetTitle("Base");
$this->SetSummary(_("Choose a base"));
$this->SetListHeader("<div style='background:#F0F0F9;padding:5px;'>".
/* Add departments, to be able to switch into them
*/
while($attrs = $ldap->fetch()){
-
+
$key = $attrs['dn'] ;
$val = $attrs['ou'][0];
+
+ if(count($this->allowedBases) != 0){
+ if(!isset($this->allowedBases[$key])){
+ continue;
+ break;
+ }
+ }
/* Append description */
if(isset($attrs['description'][0])){
index 7e3d3f45c8d0f05f711246cd27130282fe1cf772..7d6c7c51ec59a5b0c7a9750801a7d058f025108d 100644 (file)
/* Base select dialog */
if(isset($_POST['chooseBase'])){
- $this->dialog = new baseSelectDialog($this->config);
+ $this->dialog = new baseSelectDialog($this->config,$this->allowedBasesToMoveTo());
$this->dialog->setCurrentBase($this->base);
}
$ldap->search("(&(objectClass=posixGroup)(memberUid=".$_SESSION['ui']->username."))",array("gosaSubtreeACL"));
while($attrs = $ldap->fetch()){
- foreach($attrs['gosaSubtreeACL'] as $attr){
- if((preg_match("/:user#/",$attr))||(preg_match("/:all/",$attr))){
- $s = preg_replace("/^.*ou=groups,/","",$attrs['dn']);
-
- foreach($this->config->idepartments as $key => $dep) {
- if(preg_match("/".$s."/i",$key)){
- $allowed[$key] = $dep;
+
+ if(isset($attrs['gosaSubtreeACL'])){
+
+ foreach($attrs['gosaSubtreeACL'] as $attr){
+ if((preg_match("/:user#/",$attr))||(preg_match("/:all/",$attr))){
+ $s = preg_replace("/^.*ou=groups,/","",$attrs['dn']);
+
+ foreach($this->config->idepartments as $key => $dep) {
+ if(preg_match("/".$s."/i",$key)){
+ $allowed[$key] = $dep;
+ }
}
}
}