Code

Updated gotoLpdEnable class
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Oct 2008 09:05:49 +0000 (09:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Oct 2008 09:05:49 +0000 (09:05 +0000)
-Added Acl.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12762 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc
gosa-plugins/goto/admin/systems/goto/class_terminalService.inc
gosa-plugins/goto/admin/systems/goto/gotoLpdEnable.tpl

index beec5b7adf64fe421ef31040c66adcecaff819f1..5738c0ec48ef045182f95755912abe1dabfc2bfa 100644 (file)
@@ -26,7 +26,6 @@ class gotoLpdEnable extends plugin
   private $a_Speeds = array();      // 
   private $a_Bits = array();        //
   private $a_Devices = array();
-
   public    $attributes = array("s_Type","s_Device","i_Port","s_Options","s_WriteOnly",
       "s_Speed","s_FlowControl","s_Parity","i_Bit");
 
@@ -122,6 +121,7 @@ class gotoLpdEnable extends plugin
     /* Set smarty variables 
      */
                $smarty = get_smarty();
+    $smarty->assign("acl",$this->parent->getacl("gotoLpdEnable"));
     foreach($this->attributes as $attr){
       $smarty->assign($attr,$this->$attr);
     }
@@ -166,6 +166,9 @@ class gotoLpdEnable extends plugin
   */
   public function save_object()
   {
+    if(!$this->parent->acl_is_writeable("gotoLpdEnable")){
+      return;
+    }
 
     if(!isset($_POST['gotoLpdEnable_entry_posted'])){
       return;
index 8d36860425826367b268c94b5d778b4cd490bf4f..9236b8bec04a472fd7856ba5dc1dac599b68991f 100644 (file)
@@ -694,8 +694,8 @@ class termservice extends plugin
             "gotoXHsync"              => _("HSync"),
             "gotoXVsync"              => _("VSync"),
             "AutoSync"                => _("Auto-Sync"),
-            "gotoLpdServer"           => _("Spool server"),
             "gotoScannerEnable"       => _("Scanner enabled"),
+            "gotoLpdEnable"           => _("Printer enabled"),
             "gotoXKbModel"            => _("Keyboard model"),
             "gotoXKbLayout"           => _("Keyboard layout"),
             "gotoXKbVariant"          => _("Keyboard variant"),
index 438068495cb37bb16ad1e2a6010902e493cc8871..daff63c3c5edd3bf2a0b98b304bed24dc2c33983 100644 (file)
@@ -6,9 +6,11 @@
                        <table>
                                <tr>
                                        <td colspan="2">
+                                               {render acl=$acl}
                                                <input class="center" type='checkbox' onChange="document.mainform.submit();" 
                                                        {if $is_account} checked {/if}
                                                        name='gotoLpdEnable_enabled'>&nbsp;{t}Enable printer settings{/t}</td>
+                                               {/render}
                                        </td>
                                </tr>
                        </table>
 -->
                                <tr>
                                        <td colspan="2">
+                                               {render acl=$acl}
                                                <input class="center" type='checkbox' onChange="document.mainform.submit();" 
                                                        {if $is_account} checked {/if}
                                                        name='gotoLpdEnable_enabled'>&nbsp;{t}Enable printer settings{/t}</td>
+                                               {/render}
                                        </TD>
                                </tr>
                                <tr>
                                        <td>{t}Type{/t}</td>
                                        <td>    
+                                               {render acl=$acl}
                                                <select name='s_Type'  onChange="document.mainform.submit();">
                                                        {html_options options=$a_Types selected=$s_Type}
                                                </select>
+                                               {/render}
                                        </td>
                                </tr>
                                <tr>
                                        <td>{t}Device{/t}</td>
                                        <td>    
+                                               {render acl=$acl}
                                                <input type='text' name='s_Device' value='{$s_Device}'>
+                                               {/render}
                                        </td>
                                </tr>
                                <tr>
                                        <td>{t}Port{/t}</td>
                                        <td>
+                                               {render acl=$acl}
                                                <input type='text' name='i_Port' value='{$i_Port}'>
+                                               {/render}
                                        </td>
                                </tr>
                                <tr>
                                        <td>{t}Options{/t}</td>
                                        <td>
+                                               {render acl=$acl}
                                                <input type='text' name='s_Options' value='{$s_Options}'>
+                                               {/render}
                                        </td>
                                </tr>
                                <tr>
                                        <td>{t}Write only{/t}</td>
                                        <td>
+                                               {render acl=$acl}
                                                <input {if $s_WriteOnly == "Y"} checked {/if} type='checkbox' name='s_WriteOnly' value='Y' >
+                                               {/render}
                                        </td>
                                </tr>
                        </table>
                                <tr>
                                        <td>{t}Bit rate{/t}</td>
                                        <td>
+                                               {render acl=$acl}
                                                <select name='s_Speed'>
                                                        {html_options options=$a_Speeds selected=$s_Speed}
                                                </select>
+                                               {/render}
                                        </td>
                                </tr>
                                <tr>
                                        <td>{t}Flow control{/t}</td>
                                        <td>
+                                               {render acl=$acl}
                                                <select name='s_FlowControl'>
                                                        {html_options options=$a_FlowControl selected=$s_FlowControl}
                                                </select>
+                                               {/render}
                                        </td>
                                </tr>
                                <tr>
                                        <td>{t}Parity{/t}</td>
                                        <td>
+                                               {render acl=$acl}
                                                <select name='s_Parity'>
                                                        {html_options options=$a_Parities selected=$s_Parity}
                                                </select>
+                                               {/render}
                                        </td>
                                </tr>
                                <tr>
                                        <td>{t}Bits{/t}</td>
                                        <td>
+                                               {render acl=$acl}
                                                <select name='i_Bit'>
                                                        {html_options options=$a_Bits selected=$i_Bit}
                                                </select>
+                                               {/render}
                                        </td>
                                </tr>
                        </table>