Code

Fixed problem with sudo plugin
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Nov 2010 14:13:17 +0000 (14:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Nov 2010 14:13:17 +0000 (14:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20384 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc
gosa-plugins/sudo/admin/sudo/generic.tpl

index b1b43a2336b00bca51a88f6a318e852388ec3f90..b99f944b0e0a9c7c0f9442a8111ec8ce5301e2a0 100644 (file)
@@ -42,7 +42,9 @@ class sudo extends plugin
 
     public $ignore_account = TRUE;
 
+       
     public $orig_dn;
+    private $systemEnabled = FALSE;
 
     /*! \brief  Returns to the base department for sudo roles.
       This department is then used to store new roles.
@@ -63,6 +65,8 @@ class sudo extends plugin
     {
         plugin::plugin ($config, $dn);
 
+       $this->systemEnabled = class_available("systemSelect");
+
         $this->trustModeDialog = new trustModeDialog($this->config, $this->dn,NULL);
         $this->trustModeDialog->setAcl('sudo/sudo');
 
@@ -138,7 +142,7 @@ class sudo extends plugin
             return($trustModeDialog);
 
         }
-        $this->dialog = FALSE;
+##        $this->dialog = FALSE;
 
         /*********************
           Add users 
@@ -318,6 +322,7 @@ class sudo extends plugin
          *********************/
 
         $smarty = get_smarty();
+        $smarty->assign("systemEnabled", $this->systemEnabled);
         $smarty->assign("trustModeDialog" , $trustModeDialog);
         $smarty->assign("is_default",$this->is_default);
         foreach($this->attributes as $attr){
index 89170b926b5463189e538c59a90f3880418a4ca1..467b9fec54525397c9d5ec41adf4944500293bdc 100644 (file)
    <button type='submit' name='add_sudoHost'>{msgPool type=addButton}</button>
 
    {/render}
+   {if $systemEnabled}
    {render acl=$sudoHostACL}
    <button type='submit' name='list_sudoHost'>{t}Add from list{/t}</button>
-
    {/render}
+   {/if}
   </td>
  </tr> 
  <tr><td style="width:100%;"colspan="2"><hr></td></tr>