Code

Made connectivity kolabAccount compatible with new acls
[gosa.git] / plugins / personal / connectivity / class_pureftpdAccount.inc
index aa55f5d26e70cc976f09b44819ed10beb246eeb6..af13efb6a384e91ecb8f6ccfa7f5257f7d10ed2c 100644 (file)
@@ -6,11 +6,6 @@ class pureftpdAccount extends plugin
   var $plHeadline= "FTP";
   var $plDescription= "This does something";
 
-  /* CLI vars */
-  var $cli_summary= "Manage users ftp account";
-  var $cli_description= "Some longer text\nfor help";
-  var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
   /* FTP attributes */
   var $FTPQuotaFiles = 0;
   var $FTPQuotaMBytes = 0;
@@ -93,7 +88,7 @@ class pureftpdAccount extends plugin
     $this->cleanup();
     $ldap->modify ($this->attrs); 
 
-    show_ldap_error($ldap->get_error(), _("Removing pureftpd account failed"));
+    show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/pureftpd account with dn '%s' failed."),$this->dn));
 
     /* Optionally execute a command after we're done */
     $this->handle_post_events('remove');
@@ -172,7 +167,7 @@ class pureftpdAccount extends plugin
     $this->cleanup();
     $ldap->modify ($this->attrs); 
 
-    show_ldap_error($ldap->get_error(), _("Saving pureftpd account failed"));
+    show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/pureftpd account with dn '%s' failed."),$this->dn));
 
     /* Optionally execute a command after we're done */
     if ($this->initially_was_account == $this->is_account){
@@ -185,6 +180,31 @@ class pureftpdAccount extends plugin
 
   }
 
+
+  /* Return plugin informations for acl handling
+  #FIME There possibly some attributes that can be combined to one acl. */
+  function plInfo()
+  {
+    return (array(
+          "plShortName"     => _("Ftp"),
+          "plDescription"   => _("Pure ftp account"),
+          "plSelfModify"    => TRUE,
+          "plDepends"       => array("connectivity"),
+          "plPriority"      => 8,                                 // Position in tabs
+          "plSection"       => "personal",                        // This belongs to personal
+          "plCategory"      => array("gosaAccount"),
+          "plOptions"       => array(),
+
+          "plProvidedAcls"  => array(
+            "FTPQuotaFiles"         => "!!! FIXME "._("Quota files"),
+            "FTPUploadRatio"        => _("Upload ratio"),
+            "FTPQuotaMBytes"        => _("Quota MBytes"),
+            "FTPDownloadRatio"      => _("Download ratio"),
+            "FTPUploadBandwidth"    => _("Upload bandwith"),
+            "FTPDownloadBandwidth"  => _("Download bandwith"),
+            "FTPStatus"             => _("Status"))
+          ));
+  }
 }
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: