Code

Added base checks
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 1 Feb 2010 10:01:04 +0000 (10:01 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 1 Feb 2010 10:01:04 +0000 (10:01 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15526 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_listing.inc
gosa-core/plugins/admin/acl/class_aclRole.inc
gosa-core/plugins/admin/departments/class_department.inc
gosa-core/plugins/admin/groups/class_group.inc
gosa-core/plugins/personal/generic/class_user.inc

index d1a2d3d1361be8ef52ab2c5f1ca849811a8a9329..d939882cf8a1457ebf0fbe732d5b7df8722e9a8d 100644 (file)
@@ -472,6 +472,10 @@ class listing {
     // Take care of base selector
     if ($this->baseMode) {
       $this->baseSelector->update();
+      // Check if a wrong base was supplied
+      if(!$this->baseSelector->checkLastBaseUpdate()){
+         msg_dialog::display(_("Error"), msgPool::check_base(), ERROR_DIALOG);
+      }
     }
 
     // Save base
index cc94aedb9fb6b763363f33f82aedea428e8f85fe..91881e57001c2ffdad3182f8b97d171b4ed8d6a6 100644 (file)
@@ -761,6 +761,11 @@ class aclrole extends acl
     if(!count($this->gosaAclTemplate)){
       $message[] = msgPool::required(_("ACL"));
     }
+
+    // Check if a wrong base was supplied
+    if(!$this->baseSelector->checkLastBaseUpdate()){
+      $message[]= msgPool::check_base();;
+    }
  
     /* Check if we are allowed to create or move this object
      */
index 685564bf5afea0703a7572e5ca4f4342ef6835b7..ba0cc57099b6105356ccc23788d9803ccaf7f693 100644 (file)
@@ -312,6 +312,11 @@ class department extends plugin
                        $message[]= msgPool::invalid(_("Fax"), $this->facsimileTelephoneNumber, "/[\/0-9 ()+*-]/");
                }
 
+    // Check if a wrong base was supplied
+    if(!$this->baseSelector->checkLastBaseUpdate()){
+      $message[]= msgPool::check_base();;
+    }
+
     /* Check if we are allowed to create or move this object
      */
     if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){
index d63a6965b82575e11f2bde1df12a5e949dd88e89..fa2e63cdb9b24a9208b40c3ec36965470d395a73 100644 (file)
@@ -1054,6 +1054,11 @@ class group extends plugin
       $message[]= msgPool::required(_("Name"));
     }
 
+    // Check if a wrong base was supplied
+    if(!$this->baseSelector->checkLastBaseUpdate()){
+      $message[]= msgPool::check_base();;
+    }
+
     /* Check for valid input */
     if (!tests::is_uid($this->cn)){
       if (strict_uid_mode()){
@@ -1063,6 +1068,11 @@ class group extends plugin
       }
     }
 
+    // Check if a wrong base was supplied
+    if(!$this->baseSelector->checkLastBaseUpdate()){
+      $message[]= msgPool::check_base();;
+    }
+
     if($this->allowGroupsWithSameNameInOtherSubtrees == true){
 
       /* Check for used 'cn' */
index 4ceb1dc2ae4992d05b1fdfdd0560959aba6080a7..4eeadb7a572e744874967397536b43ab2adc3837 100644 (file)
@@ -1271,6 +1271,11 @@ class user extends plugin
       $message[]= msgPool::required(_("Name"));
     }
 
+    // Check if a wrong base was supplied
+    if(!$this->baseSelector->checkLastBaseUpdate()){
+      $message[]= msgPool::check_base();;
+    }
+
     if (!$this->is_template){
       if ($this->givenName == ""){
         $message[]= msgPool::required(_("Given name"));