Code

Updated sudo classes
[gosa.git] / gosa-plugins / sudo / admin / sudo / class_sudoManagement.inc
index d542e4dd3f625302d474d7ffb88f11763bce5590..7be36c35f23547da610bff997e89b4999a7203d4 100644 (file)
 class sudoManagement extends plugin
 {
   /* Definitions */
-  public $plHeadline     = "Sudo";
+  public $plHeadline     = "Sudo roles";
   public $plDescription  = "Manage sudo roles";
 
   private $DivListSudo    = NULL;
   private $sudotabs       = NULL;
   private $base           = "";
  
-
-   
+  /*! \brief */ 
   public function __construct(&$config, &$ui)
   {
     /* Save configuration for internal use */
@@ -49,6 +48,8 @@ class sudoManagement extends plugin
   }
 
 
+  /*! \brief Generate && Display HTML content 
+   */
   public function execute()
   {
     /* Call parent execute */
@@ -310,7 +311,10 @@ class sudoManagement extends plugin
     return($this->DivListSudo->Draw());
   }
 
-
+  
+  /*! \brief  Return all selected elements from HTML list 
+      @return Array List of all selected list elements 
+    */
   private function list_get_selected_items()
   {
     $ids = array();
@@ -324,6 +328,8 @@ class sudoManagement extends plugin
   }
 
 
+  /*! \brief  Reload the list of sudo roles. 
+   */
   private function reload($CreatePosixsList=false)
   {
     $this->list             = array();
@@ -352,12 +358,16 @@ class sudoManagement extends plugin
   }
 
 
-  /* Save data to object */
+  /*! \brief Save HTML post data to object 
+   */
   public function save_object()
   {
     $this->DivListSudo->save_object();
   }
 
+  
+  /*! \brief Remove this account 
+   */
   public function remove_from_parent()
   {
     /* Optionally execute a command after we're done */
@@ -365,12 +375,23 @@ class sudoManagement extends plugin
   }
 
 
-  /* Save to LDAP */
+  /*! \brief Save to LDAP 
+   */
   public function save()
   {
     /* Optionally execute a command after we're done */
     $this->postcreate();
   }
+
+  
+  /*! \brief Remove lock from entry 
+   */
+  public function remove_lock()
+  {
+    if (isset($this->sudotabs->dn)){
+      del_lock ($this->sudotabs->dn);
+    }
+  }
 }
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>