Code

Added new show_*_header to environemnt
[gosa.git] / plugins / personal / samba / class_sambaAccount.inc
index 177e6836bc89e5a2b25d21218b8c169a62c8969e..7f548f72ad144addb2a30e1a13394385c411aedf 100644 (file)
@@ -322,7 +322,7 @@ class sambaAccount extends plugin
       $acl= array($this->config->current['BASE'] => ":all");
       $regex= $sambafilter['regex'];
       $filter= "(&(objectClass=sambaSAMAccount)$exclude(uid=*$)(|(uid=$regex)(cn=$regex)))";
-      $res= get_list($acl, "$filter", TRUE, $sambafilter['depselect'], array("uid"), TRUE);
+      $res= get_list($filter, $acl, $sambafilter['depselect'], array("uid"), GL_SUBSEARCH | GL_SIZELIMIT);
       $wslist= array();
       foreach ($res as $attrs){
         $wslist[]= preg_replace('/\$/', '', $attrs['uid'][0]);
@@ -622,9 +622,9 @@ class sambaAccount extends plugin
         $this->attributes, "Save");
     $ldap->cd($this->dn);
     $this->cleanup();
-$ldap->modify ($this->attrs); 
+    $ldap->modify ($this->attrs); 
 
-    show_ldap_error($ldap->get_error());
+    show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/samba account with dn '%s' failed."),$this->dn));
 
     /* Optionally execute a command after we're done */
     $this->handle_post_events("remove");
@@ -824,7 +824,7 @@ $ldap->modify ($this->attrs);
   {
     /* Load uid and gid of this 'dn' */
     $ldap= $this->config->get_ldap_link();
-    $ldap->cat($this->dn);
+    $ldap->cat($this->dn, array('uidNumber', 'gidNumber'));
     $tmp= $ldap->fetch();
     $this->uidNumber= $tmp['uidNumber'][0];
     $this->gidNumber= $tmp['gidNumber'][0];
@@ -969,9 +969,9 @@ $ldap->modify ($this->attrs);
     /* Write back to ldap */
     $ldap->cd($this->dn);
     $this->cleanup();
-$ldap->modify ($this->attrs); 
+    $ldap->modify ($this->attrs); 
 
-    show_ldap_error($ldap->get_error());
+    show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/samba account with dn '%s' failed."),$this->dn));
 
     /* Optionally execute a command after we're done */
     if ($this->initially_was_account == $this->is_account){
@@ -1029,10 +1029,40 @@ $ldap->modify ($this->attrs);
       $sambafilter= array( "depselect" => $base, "regex" => "*");
       register_global("sambafilter", $sambafilter);
     }
-
-
   }
 
+  
+  function plInfo()
+  {
+    return (array(
+          "plShortName"     => _("Samba"),
+          "plDescription"   => _("Samba settings"),
+          "plSelfModify"    => TRUE,
+          "plDepends"       => array("user"),
+          "plPriority"      => 5,                                 // Position in tabs
+          "plSection"       => "personal",                        // This belongs to personal
+          "plCategory"      => array("users"),                    // Add to following categories
+          "plOptions"       => array(),
+
+          "plProvidedAcls"  => array(
+            "AllowLoginOnTerminalServer"  => _("Allow login on terminal server"),
+            "InheritClientConfig"         => _("Inherit client config"),
+            "sambaAcctFlags_N"            => _("Login from windows client requires no password"),
+            "sambaAcctFlags_L"            => _("Lock samba account"),
+
+            "sambaLogonTime"        => _("Limit Logon Time") ,
+            "sambaLogoffTime"       => _("Limit Logoff Time") ,
+            "sambaKickoffTime"      => _("Account expires") ,
+            "sambaPwdCanChange"     => _("Allow user to change password") ,
+            "sambaPwdMustChange"    => _("Password expires") ,
+            "sambaHomePath"         => _("Generic home directory") ,
+            "sambaHomeDrive"        => _("Generic samba home drive") ,
+            "sambaLogonScript"      => _("Generic script path") ,
+            "sambaProfilePath"      => _("Generic profile path") ,
+            "sambaDomainName"       => _("Domain") ,
+            "sambaUserWorkstations" => _("Allow connection from")))
+              );
+  }    
 }
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: