1 <?php
3 class termservice extends plugin
4 {
5 /* CLI vars */
6 var $cli_summary= "Manage terminal service aspects";
7 var $cli_description= "Some longer text\nfor help";
8 var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
10 /* Generic terminal attributes */
11 var $gotoLpdEnable= FALSE;
12 var $gotoXMonitor= "";
13 var $gotoXMethod= "default";
14 var $gotoXdmcpServer= "";
15 var $gotoXDriver= "";
16 var $gotoXResolution= "";
17 var $gotoXColordepth= "";
18 var $gotoXHsync= "";
19 var $gotoXVsync= "";
20 var $gotoXKbModel= "";
21 var $gotoXKbLayout= "";
22 var $gotoXKbVariant= "";
23 var $gotoXMouseType= "";
24 var $gotoXMouseport= "";
25 var $gotoLpdServer= "";
26 var $gotoScannerEnable= "";
27 var $gotoScannerModel= "";
28 var $gotoScannerClients= "";
29 var $gotoScannerBackend= "";
30 var $goFonHardware= "automatic";
32 var $AutoSync = false;
33 var $view_logged = FALSE;
35 /* Needed values and lists */
36 var $ignore_account= TRUE;
37 var $base= "";
38 var $cn= "";
39 var $orig_dn= "";
40 var $XMethods= array();
41 var $XDrivers= array();
42 var $XResolutions= array();
43 var $XColordepths= array();
44 var $XKbModels= array ();
45 var $XKbLayouts= array ();
46 var $XKbVariants= array ();
47 var $MouseTypes= array();
48 var $MousePorts= array();
49 var $hardware_list= array();
50 var $used_hardware= array();
53 /* attribute list for save action */
54 var $attributes= array("gotoLpdEnable", "gotoXMonitor", "gotoXMethod", "gotoXdmcpServer",
55 "gotoXDriver", "gotoXResolution", "gotoXColordepth",
56 "gotoXHsync", "gotoXVsync", "gotoLpdEnable", "gotoLpdServer",
57 "gotoScannerEnable", "gotoScannerModel", "gotoScannerClients",
58 "gotoScannerBackend", "gotoXKbModel", "gotoXKbLayout", "gotoXKbVariant",
59 "gotoXMouseType", "gotoXMouseport", "goFonHardware");
60 var $objectclasses= array("GOhard");
62 var $is_ogroup = FALSE;
63 var $is_ogroup_member = FALSE;
65 var $selected_xdmcp_servers = array();
66 var $inherited_xdmcp_servers = array();
68 function termservice (&$config, $dn= NULL, $parent= NULL)
69 {
70 plugin::plugin ($config, $dn, $parent);
71 $this->orig_dn= $this->dn;
73 /* Check if we are a part of an ogroup.
74 * In this case, we have to hide all the inherit stuff.
75 */
76 if(isset($parent) && get_class($parent) == "ogroup"){
77 $this->is_ogroup = TRUE;
78 }
80 /* Check if we are member of an object group.
81 */
82 $ldap= $this->config->get_ldap_link();
83 $ldap->cd($this->config->current['BASE']);
84 $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))");
85 if($ldap->count()){
86 $this->is_ogroup_member = TRUE;
87 }
89 /* Get list of available xdrivers */
90 $this->XDrivers = $this->getListOfXDrivers();
92 /* Create a list of available resolutions.
93 */
94 $this->XResolutions= array(
95 "640x480" => "640x480",
96 "800x600" => "800x600",
97 "1024x768" => "1024x768",
98 "1152x864" => "1152x864",
99 "1280x1024" => "1280x1024",
100 "1400x1050" => "1400x1050",
101 "1600x1200" => "1600x1200");
103 if(isset($this->config->data['MAIN']['RESOLUTION_HOOK'])){
104 $file = $this->config->data['MAIN']['RESOLUTION_HOOK'];
105 if(is_readable($file)){
106 $str = file_get_contents($file);
107 $lines = split("\n",$str);
108 foreach($lines as $line){
109 $line = trim($line);
110 if(!empty($line)){
111 $this->XResolutions[$line]=$line;
112 }
113 }
114 }else{
115 print_red(sprintf(_("You have specified an external resolution hook which can't be read, please check the permission of the file '%s'."),$file));
116 }
117 }
119 /* Create a set of selectable color depths
120 */
121 $this->XColordepths= array(
122 "8" => "8 " ._("bit"),
123 "15" => "15 "._("bit"),
124 "16" => "16 "._("bit"),
125 "24" => "24 "._("bit"));
128 /* Create a set of selectable keyboard models
129 */
130 $this->XKbModels = array();
131 foreach(array ("btc9000", "chicony", "compaq", "dell", "dell101", "everex",
132 "flexpro", "geniuscomfy", "hp", "itouch", "jp106", "logicordless",
133 "logiinetnav", "logiinternet", "macintosh", "microsoft",
134 "microsoftpro", "omnikey101", "pc101", "pc102", "pc104",
135 "pc105", "rapidaccess", "rapidaccess2", "winbook") as $type){
136 $this->XKbModels[$type] = $type;
137 }
139 /* Additional values will be extracted from CONFIG_DIR.keyboardLayouts */
140 $this->XKbLayouts = array("de"=> "de","intl" =>"intl","us" =>"us");
141 $this->XKbVariants= array("nodeadkeys"=>"nodeadkeys", "basic"=>"basic");
142 $this->MouseTypes = array("ImPS/2"=>"ImPS/2","PS/2"=>"PS/2", "explorerps/2"=>"explorerps/2",
143 "Microsoft"=>"Microsoft","Logitech"=>"Logitech");
144 $this->MousePorts = array("/dev/ttyS0"=>"/dev/ttyS0",
145 "/dev/ttyS1"=>"/dev/ttyS1","/dev/psaux"=>"/dev/psaux",
146 "/dev/input/mice"=>"/dev/input/mice");
149 /* Try to read additional keyboard layouts
150 */
151 if(file_exists(CONFIG_DIR."/keyboardLayouts")){
152 if(is_readable(CONFIG_DIR."/keyboardLayouts")){
153 $str = file_get_contents(CONFIG_DIR."/keyboardLayouts");
154 $tmp = split("\n",$str);
155 foreach($tmp as $entry){
156 if((!empty($entry)) && (!preg_match("/^#/",$entry))){
157 $entry = trim($entry);
158 $tmp2 = split ("\:",$entry);
159 $la = trim($tmp2[0]); // What would be saved to ldap
160 $da = trim($tmp2[1]); // This wis displayed in the listbox
161 $this->XKbLayouts [ $la] = $da;
162 }
163 }
164 }
165 }
167 /* Terminal server methods
168 */
169 if($this->is_ogroup_member){
170 $this->XMethods["default"]= _("inherited");
171 }
172 $this->XMethods["xdmcp"] = _("XDMCP");
173 $this->XMethods["ldm"] = _("LDM");
174 $this->XMethods["rdp"] = _("Windows RDP");
175 $this->XMethods["citrix"] = _("ICA client");
177 /* Get selected gotoXdmcpServer
178 */
179 $this->selected_xdmcp_servers = array();
180 if(isset($this->attrs['gotoXdmcpServer'])){
181 for($i = 0 ; $i < $this->attrs['gotoXdmcpServer']['count'] ; $i++){
182 $this->selected_xdmcp_servers[] = $this->attrs['gotoXdmcpServer'][$i];
183 }
184 }
186 /* Load phone hardware list
187 */
188 $ldap= $this->config->get_ldap_link();
189 $deps = array();
190 $ou = preg_replace("/,.*$/","",get_ou("phoneou"));
191 if(!empty($ou)){
192 $ldap->cd($this->config->current['BASE']);
193 $ldap->search("(&(objectClass=organizationalUnit)(".$ou."))",array("dn"));
194 while($attrs = $ldap->fetch()){
195 $deps[] = $attrs['dn'];
196 }
197 }else{
199 /* Phone ou seems to be empty, fall back to overall base .
200 */
201 $deps[] = $this->config->current['BASE'];
202 }
203 foreach($deps as $dep){
204 $ldap->cd($dep);
205 $ldap->search("(objectClass=goFonHardware)", array('cn', 'description'));
206 while ($attrs= $ldap->fetch()){
207 $cn= $attrs['cn'][0];
208 if (isset($attrs['description'])){
209 $description= " - ".$attrs['description'][0];
210 } else {
211 $description= "";
212 }
213 $this->hardware_list[$cn]= "$cn$description";
214 }
215 }
217 /* Eventually colorize phones */
218 $deps = array();
219 $ou = preg_replace("/,.*$/","",get_ou("systemsou"));
220 $deps_a = array(get_ou("ogroupou"),
221 get_ou("serverou"),
222 get_ou("terminalou"),
223 get_ou("workstationou"),
224 get_ou("printerou"),
225 get_ou("componentou"),
226 get_ou("phoneou"));
227 if(!empty($ou)){
228 $ldap->cd($this->config->current['BASE']);
229 $ldap->search("(&(objectClass=organizationalUnit)(".$ou."))",array("dn"));
230 while($attrs = $ldap->fetch()){
231 foreach($deps_a as $allowed){
232 $to_add = preg_replace("/".get_ou('systemsou')."$/","",$allowed);
233 $deps[] = $to_add.$attrs['dn'];
234 }
235 }
236 }else{
238 /* Phone ou seems to be empty, fall back to overall base .
239 */
240 $deps[] = $this->config->current['BASE'];
241 }
243 foreach($deps as $dep){
244 $ldap->cd($dep);
245 $ldap->search("(goFonHardware=*)",array('cn','dn','goFonHardware'));
246 while($attrs = $ldap->fetch()){
247 $cn = $attrs['goFonHardware'][0];
248 if(isset($this->hardware_list[$cn])){
249 $this->used_hardware[$cn]= $cn;
250 }
251 }
252 }
253 $this->hardware_list["automatic"]= _("automatic");
254 ksort($this->hardware_list);
256 /* Convert gotoLpdEnable
257 */
258 $this->gotoLpdEnable= preg_match("/yes/i",$this->gotoLpdEnable);
261 /* Load hardware list */
262 $ldap= $this->config->get_ldap_link();
263 $ldap->cd($this->config->current['BASE']);
264 $map= array(
265 "gotoXResolution",
266 "gotoXColordepth",
267 "gotoXKbModel",
268 "gotoXKbLayout",
269 # "gotoXDriver",
270 "gotoXdmcpServer",
271 "gotoXKbVariant",
272 "gotoXMouseType",
273 "gotoXMethod",
274 "gotoXMouseport");
275 $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))",$map);
276 if ($ldap->count() == 1){
277 $attrs= $ldap->fetch();
278 foreach ($map as $name){
279 if (!isset($attrs[$name][0])){
280 continue;
281 }
283 switch ($name){
284 # case 'gotoXDriver':
285 # $this->XDrivers = array('default' => _("inherited").' ['.$attrs[$name][0].']' ) + $this->XDrivers;
286 # break;
287 case 'gotoXMethod':
288 $this->XMethods = array('default' => _("inherited").' ['.$attrs[$name][0].']' ) + $this->XMethods;
289 if(isset($attrs['gotoXdmcpServer'])){
290 for($i = 0 ; $i < $attrs['gotoXdmcpServer']['count'] ; $i++){
291 $this->inherited_xdmcp_servers[] = $attrs['gotoXdmcpServer'][$i];
292 }
293 }
294 break;
295 case 'gotoXResolution':
296 $this->XResolutions= array('default' => _("inherited").' ['.$attrs[$name][0].']' ) + $this->XResolutions;
297 break;
298 case 'gotoXColordepth':
299 $this->XColordepths= array('default' => _("inherited").' ['.$attrs[$name][0].' '._('Bit').']') + $this->XColordepths;
300 break;
301 case 'gotoXKbModel':
302 $this->XKbModels= array('default' => _("inherited").' ['.$attrs[$name][0].']') + $this->XKbModels;
303 break;
304 case 'gotoXKbLayout':
305 $this->XKbLayouts= array('default' => _("inherited").' ['.$attrs[$name][0].']' ) + $this->XKbLayouts;
306 break;
307 case 'gotoXKbVariant':
308 $this->XKbVariants= array('default' => _("inherited").' ['.$attrs[$name][0].']' ) + $this->XKbVariants;
309 break;
310 case 'gotoXMouseType':
311 $this->MouseTypes= array('AUTO' => _("inherited").' ['.$attrs[$name][0].']' ) + $this->MouseTypes;
312 break;
313 case 'gotoXMouseport':
314 $this->MousePorts= array('AUTO' => _("inherited").' ['.$attrs[$name][0].']' ) + $this->MousePorts;
315 break;
316 }
317 }
318 }
320 if(preg_match("/\+/",$this->gotoXHsync)){
321 $this->AutoSync = true;
322 $this->gotoXHsync = preg_replace("/\+/","-",$this->gotoXHsync);
323 $this->gotoXVsync = preg_replace("/\+/","-",$this->gotoXVsync);
324 }
325 }
328 function execute()
329 {
330 /* Call parent execute */
331 plugin::execute();
333 if($this->is_account && !$this->view_logged){
334 $this->view_logged = TRUE;
335 new log("view","terminal/".get_class($this),$this->dn);
336 }
338 /* Do we need to flip is_account state? */
339 if (isset($_POST['modify_state'])){
340 $this->is_account= !$this->is_account;
341 }
343 /* Do we represent a valid terminal? */
344 if (!$this->is_account && $this->parent === NULL){
345 $display= "<img alt=\"\" src=\"images/stop.png\" align=\"middle\"> <b>".
346 _("This 'dn' has no terminal features.")."</b>";
347 return ($display);
348 }
350 /* Show main page */
351 $smarty= get_smarty();
353 /* Assign acls */
354 $tmp= $this->plInfo();
355 foreach($tmp['plProvidedAcls'] as $name => $translation){
356 $smarty->assign($name."ACL",$this->getacl($name));
357 }
359 if(isset($_POST['gotoXdmcpServer_add']) && isset($_POST['XdmcpAddServer'])){
360 if(!in_array($_POST['gotoXdmcpServer_add'],$this->selected_xdmcp_servers)){
361 $this->selected_xdmcp_servers[] = $_POST['gotoXdmcpServer_add'];
362 }
363 }
365 if(isset($_POST['selected_xdmcp_servers']) && isset($_POST['XdmcpDelServer'])){
366 $tmp = array();
367 foreach($this->selected_xdmcp_servers as $name){
368 if(!in_array($name,$_POST['selected_xdmcp_servers'])){
369 $tmp[] = $name;
370 }
371 }
372 $this->selected_xdmcp_servers = $tmp;
373 }
375 /* Arrays */
376 foreach(array("XMethods", "XDrivers", "XResolutions", "XColordepths",
377 "XKbModels","XKbVariants","MouseTypes", "MousePorts") as $val){
378 $smarty->assign("$val", $this->$val);
379 }
380 $smarty->assign("XKbLayouts", $this->XKbLayouts);
381 $smarty->assign("XKbLayoutKeys",array_flip($this->XKbLayouts));
382 $smarty->assign("nfsservers", $this->config->data['SERVERS']['NFS']);
385 /* Create a list of useable servers for the currently selected
386 * connection type.
387 */
388 $xdmcp_types = $this->config->data['SERVERS']['TERMINAL_SESSION_TYPES'];
389 $available_servers = array();
390 foreach($xdmcp_types as $servername =>$supported_types){
391 if(in_array(strtoupper($this->gotoXMethod),$supported_types)){
392 $available_servers[] = $servername;
393 }
394 }
396 /* Append additional information to invalid server selections.
397 */
398 $tmp = array();
399 foreach($this->selected_xdmcp_servers as $server){
400 if(in_array($server,$available_servers)){
401 $tmp[$server] = $server;
402 }else{
403 $tmp[$server] = $server." - "._("Unsupported");
404 }
405 }
407 /* Remove already selected servers from available list.
408 */
409 foreach($available_servers as $key => $server){
410 if(isset($tmp[$server])){
411 unset($available_servers[$key]);
412 }
413 }
415 $smarty->assign("selected_xdmcp_servers", $tmp);
416 $smarty->assign("inherited_xdmcp_servers", $this->inherited_xdmcp_servers);
417 $smarty->assign("available_xdmcp_servers", $available_servers);
419 /* Variables - select */
420 foreach(array("gotoXMethod","gotoXDriver", "gotoXResolution", "gotoXColordepth",
421 "gotoLpdServer", "gotoXKbModel", "gotoXKbLayout",
422 "gotoXKbVariant", "gotoXMouseType", "gotoXMouseport") as $val){
424 $smarty->assign($val."_select", $this->$val);
425 }
427 /* Variables */
428 foreach(array("gotoXHsync", "gotoXVsync") as $val){
429 $smarty->assign($val, $this->$val);
430 }
431 $smarty->assign("staticAddress", "");
433 /* Checkboxes */
434 foreach(array("gotoLpdEnable", "gotoScannerEnable") as $val){
435 if ($this->$val == TRUE) {
436 $smarty->assign("$val", "checked");
437 } else {
438 $smarty->assign("$val", "");
439 }
440 }
442 /* Phone stuff */
443 $smarty->assign ("goFonHardware", $this->goFonHardware);
444 $hl= "<select size=\"1\" name=\"goFonHardware\" title=\"".
445 _("Choose the phone located at the current terminal")."\" >\n";
446 foreach ($this->hardware_list as $cn => $description){
447 if ($cn == $this->goFonHardware){
448 $selected= "selected";
449 } else {
450 $selected= "";
451 }
452 if (isset($this->used_hardware[$cn])){
453 $color= "style=\"color:#A0A0A0\"";
454 } else {
455 $color= "";
456 }
457 $hl.= " <option $color label=\"$cn\" value=\"$cn\" $selected>$description</option>\n";
458 }
459 $hl.= "</select>\n";
460 $smarty->assign ("hardware_list", $hl);
461 $smarty->assign ("gotoXMonitor", $this->gotoXMonitor);
463 $smarty->assign("AutoSyncACL",$this->getacl("AutoSync"));
465 $smarty->assign("AutoSyncCHK"," ");
466 if($this->AutoSync){
467 $smarty->assign("AutoSyncCHK"," checked ");
468 $smarty->assign("gotoXVsyncACL", preg_replace("/w/","",$this->getacl("gotoXVsync")));
469 $smarty->assign("gotoXHsyncACL", preg_replace("/w/","",$this->getacl("gotoXHsync")));
470 }
472 /* Show main page */
473 return($smarty->fetch (get_template_path('terminalService.tpl', TRUE,dirname(__FILE__))));
474 }
476 function remove_from_parent()
477 {
478 new log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs));
479 $this->handle_post_events("remove");
481 plugin::remove_from_parent();
482 $ldap = $this->config->get_ldap_link();
483 $ldap->cd($this->dn);
484 $ldap->modify($this->attrs);
485 show_ldap_error($ldap->get_error(),_("Could not remove terminal service."));
486 }
489 /* Save data to object */
490 function save_object()
491 {
492 plugin::save_object();
494 /* Save checkbox state */
495 if (isset ($_POST['gotoXMethod'])){
496 foreach (array("gotoLpdEnable", "gotoScannerEnable") as $val){
498 if($this->acl_is_writeable($val)){
499 if (!isset ($_POST["$val"])){
500 $this->$val= FALSE;
501 } else {
502 $this->$val= TRUE;
503 }
504 }
505 }
506 }
508 if(isset($_POST['gotoXDriver'])){
509 if(isset($_POST['AutoSync'])){
510 $this->AutoSync = true;
511 }else{
512 $this->AutoSync = false;
513 }
514 }
516 /* Default entries can use blank hsync/vsync entries */
517 if ($this->dn != "" && $this->cn != "default" && $this->cn != "default"){
519 /* But only if no auto sync is enabled... */
520 if (!$this->AutoSync){
522 /* Check vsync for correct usage */
523 $val= preg_replace ("/\s/", "", $this->gotoXVsync);
524 if (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val) && $this->acl_is_writeable("gotoXVsync")){
526 $message[]= _("Please specify a valid VSync range.");
527 } elseif ($this->acl_is_writeable("gotoXVsync")){
528 list($v1,$v2)= preg_split ("/[-+]/", $val);
529 if ($v2 != ""){
530 if ($v1 > $v2){
531 $message[]= _("Please specify a valid VSync range.");
532 }
533 }
534 }
536 /* Check hsync for correct usage */
537 $val= preg_replace ("/\s/", "", $this->gotoXHsync);
538 if (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val) && $this->acl_is_writeable("gotoXHsync")){
540 $message[]= _("Please specify a valid HSync range.");
541 } elseif ($this->acl_is_writeable("gotoXHsync")){
542 list($v1,$v2)= preg_split ("/[-+]/", $val);
543 if ($v2 != ""){
544 if ($v1 > $v2){
545 $message[]= _("Please specify a valid HSync range.");
546 }
547 }
548 }
549 }
550 }
551 }
554 /* Check supplied data */
555 function check()
556 {
557 /* Call common method to give check the hook */
558 $message= plugin::check();
560 if($this->gotoXMethod != "default"){
561 $xdmcp_types = $this->config->data['SERVERS']['TERMINAL_SESSION_TYPES'];
562 $available_servers = array();
563 foreach($xdmcp_types as $servername =>$supported_types){
564 if(in_array(strtoupper($this->gotoXMethod),$supported_types)){
565 $available_servers[] = $servername;
566 }
567 }
568 foreach($this->selected_xdmcp_servers as $server){
569 if(!in_array($server,$available_servers)){
570 $message[] = _("Remote desktop settings contains servers that do not support the selected connection method.");
571 break;
572 }
573 }
574 }
576 return ($message);
577 }
580 /* Save to LDAP */
581 function save()
582 {
583 /* Convert to string */
584 $this->gotoLpdEnable= $this->gotoLpdEnable?"Yes":"No";
586 if($this->is_ogroup){
587 $this->objectclasses = array("gotoWorkstationTemplate");
588 }else{
589 $this->objectclasses = array("GOhard");
590 }
592 plugin::save();
594 /* Strip out 'default' values */
595 foreach(array("gotoXMethod","gotoXDriver", "gotoXResolution", "gotoXColordepth",
596 "gotoLpdServer", "gotoXKbModel", "gotoXKbLayout",
597 "gotoXKbVariant", "gotoXMouseType", "gotoXMouseport") as $val){
599 if ($this->attrs[$val] == "default"){
600 $this->attrs[$val]= array();
601 }
602 }
604 if($this->gotoXMethod == "default"){
605 $this->attrs['gotoXdmcpServer'] = array();
606 $this->attrs['gotoXMethod'] = array();
607 }else{
608 $this->attrs['gotoXdmcpServer'] = array_values($this->selected_xdmcp_servers);
609 }
612 if($this->AutoSync){
613 $this->attrs['gotoXHsync'] = "30+55";
614 $this->attrs['gotoXVsync'] = "50+70";
615 }
617 /* Write back to ldap */
618 $ldap= $this->config->get_ldap_link();
619 $ldap->cd($this->dn);
620 $this->cleanup();
621 $ldap->modify ($this->attrs);
622 new log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
624 show_ldap_error($ldap->get_error(), sprintf(_("Saving of object system terminal/service with dn '%s' failed."),$this->dn));
625 $this->handle_post_events("modify");
626 }
629 function getListOfXDrivers()
630 {
631 $drivers = array("default" => "["._("unknown")."]");
633 /* Generate a list of xdrivers from CONFIG_DIR/xdrivers */
634 if (file_exists(CONFIG_DIR.'/xdrivers')){
635 $xdrivers = file (CONFIG_DIR.'/xdrivers');
636 foreach ($xdrivers as $line){
637 if (!preg_match ("/^#/", $line)){
638 $drivers[]= trim($line);
639 }
640 }
641 } else {
642 foreach( array(
643 "ati", "atimisc", "chips", "cirrus", "cyrix", "fbdev", "fglrx",
644 "i128", "i740", "i810", "imstt", "mga", "neomagic", "newport", "nsc", "nv", "nvidia",
645 "r128", "radeon", "rendition", "s3", "s3virge", "savage", "siliconmotion",
646 "sis", "tdfx", "tga", "trident", "tseng", "vesa", "vga", "vmware") as $driver){
647 $drivers[] = $driver;
648 }
649 }
650 return($drivers);
651 }
654 /* Return plugin informations for acl handling */
655 static function plInfo()
656 {
657 return (array(
658 "plShortName" => _("Service"),
659 "plDescription" => _("Terminal service"),
660 "plSelfModify" => FALSE,
661 "plDepends" => array(),
662 "plPriority" => 3,
663 "plSection" => array("administration"),
664 "plCategory" => array("terminal"),
666 "plProvidedAcls"=> array(
667 "gotoXMonitor" => _("Monitor"),
668 "gotoXMethod" => _("Method"),
669 "gotoXdmcpServer" => _("Remote desktop"),
670 "gotoXDriver" => _("Gfx driver"),
671 "gotoXResolution" => _("Gfx resolution"),
672 "gotoXColordepth" => _("Gfx color depth"),
673 "gotoXHsync" => _("Hsync"),
674 "gotoXVsync" => _("Vsync"),
675 "AutoSync" => _("Auto-Sync"),
676 "gotoLpdEnable" => _("Printer service enabled"),
677 "gotoLpdServer" => _("Spool server"),
678 "gotoScannerEnable" => _("Scanner enabled"),
679 "gotoXKbModel" => _("Keyboard model"),
680 "gotoXKbLayout" => _("Keyboard layout"),
681 "gotoXKbVariant" => _("Keyboard variant"),
682 "gotoXMouseType" => _("Mouse type"),
683 "gotoXMouseport" => _("Mouse port"),
684 "goFonHardware" => _("Telephone hardware"))
685 ));
686 }
687 }
689 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
690 ?>