Code

Some fixes, with posix tab
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Aug 2005 14:04:55 +0000 (14:04 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Aug 2005 14:04:55 +0000 (14:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1235 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_environment.inc
plugins/personal/posix/class_posixAccount.inc

index d3e8a69c121b397f1aa56ea23a7779cc30f175c1..879f2bc69f96684d99b789d388757316104e55c6 100644 (file)
@@ -569,6 +569,10 @@ class environment extends plugin
       $message[]=_("Please set a valid profile quota size.");
     }  
 
+    if(!((in_array("posixAccount",$this->attrs['objectClass']))||($this->parent->by_object['posixAccount']->is_account==true))){
+      $message[]=(_("You need to setup a valid posix extension in order to enable evironment features."));  
+    }
+
     return ($message);
   }
 
index f49106f4a11a5d7291569a809244d0943e0ef71b..4cf6480132acfc9c1f9b9396e08c708b084aaf9b 100644 (file)
@@ -230,14 +230,15 @@ class posixAccount extends plugin
           $obj= $this->parent->by_object['sambaAccount'];
         }
         if (isset($obj) && $obj->is_account == TRUE &&
-            isset($this->parent->by_object['sambaAccount'])){
+             ((isset($this->parent->by_object['sambaAccount']))&&($this->parent->by_object['sambaAccount']->is_account))
+                       ||(isset($this->parent->by_object['environment'] ))&&($this->parent->by_object['environment'] ->is_account)){
 
           /* Samba3 dependency on posix accounts are enabled
              in the moment, because I need to rely on unique
              uidNumbers. There'll be a better solution later
              on. */
           $display= $this->show_header(_("Remove posix account"),
-              _("This account has unix features enabled. To disable them, you'll need to remove the samba account first."), TRUE);
+              _("This account has unix features enabled. To disable them, you'll need to remove the samba / environment account first."), TRUE);
         } else {
           $display= $this->show_header(_("Remove posix account"),
               _("This account has posix features enabled. You can disable them by clicking below."));