Code

45238bdc33215e6dd7d53e06e6bd8bb56d34c2b1
[gosa.git] / plugins / admin / groups / class_groupManagement.inc
1 <?php
2 /*
3    This code is part of GOsa (https://gosa.gonicus.de)
4    Copyright (C) 2003  Cajus Pollmeier
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License, or
9    (at your option) any later version.
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20 require "tabs_group.inc";
22 class groupManagement extends plugin
23 {
24   /* Definitions */
25   var $plHeadline= "Groups";
26   var $plDescription= "This does something";
27   var $departments = array();
29   /* Dialog attributes */
30   var $grouptab= NULL;
31   var $grouplist= array();
32   var $ui= NULL;
33   var $acl= "";
35   function groupManagement ($config, $ui)
36   {
37     /* Save configuration for internal use */
38     $this->config= $config;
39     $this->ui= $ui;
41     /* Get global filter config */
42     if (!is_global("groupfilter")){
43       $base= get_base_from_people($ui->dn);
44       $groupfilter= array("primarygroups" => "checked",
45           "mailgroups" => "checked",
46           "sambagroups" => "checked",
47           "appgroups" => "checked",
48           "functionalgroups" => "checked",
49           "guser" => "*",
50           "subsearch" => "",
51           "depselect" => $base,
52           "regex" => "*");
53       register_global("groupfilter", $groupfilter);
54     }
55   }
57   function execute()
58   {
59         /* Call parent execute */
60         plugin::execute();
62     $_SESSION['LOCK_VARS_TO_USE'] = array("/^act$/","/^id$/","/^group_edit_/","/^group_del_/");
64     /* Save data */
65     $groupfilter= get_global("groupfilter");
66     $s_action   = "";
67     $s_entry    = "";
70     if (!isset($this->grouptab)){
71       foreach( array("depselect", "guser", "regex") as $type){
72         if (isset($_POST[$type])){
73           $groupfilter[$type]= $_POST[$type];
74         } 
75       }
76       if (isset($_POST['regex'])){
77         foreach( array("primarygroups", "sambagroups", "mailgroups", "appgroups",
78               "functionalgroups", "subsearch") as $type){
80           if (isset($_POST[$type])) {
81             $groupfilter[$type]= "checked";
82           } else {
83             $groupfilter[$type]= "";
84           }
85         }
86       }
87       if (isset($_GET['search'])){
88         $s= mb_substr($_GET['search'], 0, 1, "UTF8")."*";
89         if ($s == "**"){
90           $s= "*";
91         }
92         $groupfilter['regex']= $s;
93       }
94       register_global("groupfilter", $groupfilter);
95     }
98     /* Test Posts */
99     foreach($_POST as $key => $val){
100       // Post for delete
101       if(preg_match("/group_del.*/",$key)){
102         $s_action = "del";
103         $s_entry  = preg_replace("/group_".$s_action."_/i","",$key);
104         // Post for edit
105       }elseif(preg_match("/group_edit_.*/",$key)){
106         $s_action="edit";
107         $s_entry  = preg_replace("/group_".$s_action."_/i","",$key);
108         // Post for new
109       }elseif(preg_match("/dep_back.*/i",$key)){
110         $s_action="back";
111       }elseif(preg_match("/group_new.*/",$key)){
112         $s_action="new";
113       }elseif(preg_match("/dep_home.*/i",$key)){
114         $s_action="home";
115       }elseif(preg_match("/group_tplnew.*/i",$key)){
116         $s_action="new_tpl";
117       }elseif(preg_match("/group_chgpw.*/i",$key)){
118         $s_action="change_pw";
119         $s_entry  = preg_replace("/group_chgpw_/i","",$key);
120       }elseif(preg_match("/dep_root.*/i",$key)){
121         $s_action="root";
122       }
123     }
124     $s_entry  = preg_replace("/_.$/","",$s_entry); 
126     /* Start for New List Managment */
127     if(isset($_GET['act'])&&($_GET['act']=="dep_open")){
128       $s_action="open";
129       $s_entry = base64_decode($_GET['dep_id']);
130       $groupfilter['depselect']= "".$this->config->departments[trim($s_entry)];
131     }
133     // Edit if
134     if((isset($_GET['act']))&&($_GET['act']=="edit_entry")){
135       $s_action ="edit";
136       $s_entry  = $_GET['id'];
137     }
139     /* Department changed? */
140     if(isset($_POST['depselect']) && $_POST['depselect']){
141       $groupfilter['depselect']= $_POST['depselect'];
142     }
144     /* Homebutton is posted */
145     if($s_action=="home"){
146       $groupfilter['depselect']= (preg_replace("/^[^,]+,/","",$this->ui->dn));
147       $groupfilter['depselect']= (preg_replace("/^[^,]+,/","",$groupfilter['depselect']));
148     }
150     if($s_action=="root"){
151       $groupfilter['depselect']=($this->config->current['BASE']);
152     }
154     /* If Backbutton is Posted */
155     if($s_action == "back"){
156       $base_back= preg_replace("/^[^,]+,/","",$groupfilter['depselect']);
157       $base_back= convert_department_dn($base_back);
159       if(isset($this->config->departments[trim($base_back)])){
160         $groupfilter['depselect']= $this->config->departments[trim($base_back)];
161       }else{
162         $groupfilter['depselect']= $this->config->departments["/"];
163       }
164     }
165     register_global("groupfilter", $groupfilter);
167     $smarty= get_smarty();
169     /* Prepare formular */
170     $this->reload();
172     /* Check for exeeded sizelimit */
173     if (($message= check_sizelimit()) != ""){
174       return($message);
175     }
177     /* New group? */
178     if ($s_action=="new"){
180       /* By default we set 'dn' to 'new', all relevant plugins will
181          react on this. */
182       $this->dn= "new";
184       /* Create new usertab object */
185       $this->grouptab= new grouptabs($this->config,
186           $this->config->data['TABS']['GROUPTABS'], $this->dn);
187       /* Set up the users ACL's for this 'dn' */
188       $acl= get_permissions ($groupfilter['depselect'], $this->ui->subtreeACL);
189       $this->grouptab->set_acl($acl);
190     }
192     /* Cancel dialogs */
193     if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel'])){
194       del_lock ($this->grouptab->dn);
195       unset ($this->grouptab);
196       $this->grouptab= NULL;
197       unset($_SESSION['objectinfo']);
198     }
200     /* Finish group edit is triggered by the tabulator dialog, so
201        the user wants to save edited data. Check and save at this
202        point. */
203     if (isset($_POST['edit_finish'])){
205       /* Check tabs, will feed message array */
206       $message= $this->grouptab->check();
208       /* Save, or display error message? */
209       if (count($message) == 0){
211         /* Save user data to ldap */
212         $this->grouptab->save();
213         gosa_log ("Group object'".$this->dn."' has been saved");
215         /* Group has been saved successfully, remove lock from
216            LDAP. */
217         if ($this->dn != "new"){
218           del_lock ($this->dn);
219         }
221         /* There's no page reload so we have to read new users at
222            this point. */
223         $this->reload ();
224         unset ($this->grouptab);
225         $this->grouptab= NULL;
226         unset ($_SESSION['objectinfo']);
228       } else {
229         /* Ok. There seem to be errors regarding to the tab data,
230            show message and continue as usual. */
231         show_errors($message);
232       }
233     }
235     /* User wants to edit data? */
236     if ($s_action=="edit"){
238       /* Get 'dn' from posted 'uid', must be unique */
239       $this->dn= $this->grouplist[trim($s_entry)]['dn'];
241       /* Check locking, save current plugin in 'back_plugin', so
242          the dialog knows where to return. */
244       $user = get_lock($this->dn);
246       if ($user != ""){
247         return(gen_locked_message ($user, $this->dn));
248       }
250       /* Lock the current entry, so everyone will get the
251          above dialog */
252       add_lock ($this->dn, $this->ui->dn);
254       /* Set up the users ACL's for this 'dn' */
255       $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
257       /* Register grouptab to trigger edit dialog */
258       $this->grouptab= new grouptabs($this->config,
259           $this->config->data['TABS']['GROUPTABS'], $this->dn);
260       $this->grouptab->set_acl($acl);
261       $_SESSION['objectinfo']= $this->dn;
262     }
264     /* Remove user was requested */
265     if ($s_action=="del"){
266       /* Get 'dn' from posted 'uid' */
267       $this->dn= $this->grouplist[trim($s_entry)]['dn'];
269       /* Load permissions for selected 'dn' and check if
270          we're allowed to remove this 'dn' */
271       $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
272       $this->acl= get_module_permission($acl, "group", $this->dn);
273       if (chkacl($this->acl, "delete") == ""){
275         /* Check locking, save current plugin in 'back_plugin', so
276            the dialog knows where to return. */
277         if (($user= get_lock($this->dn)) != ""){
278           return(gen_locked_message ($user, $this->dn));
279         }
281         /* Lock the current entry, so nobody will edit it during deletion */
282         add_lock ($this->dn, $this->ui->dn);
283         $smarty->assign("info", sprintf(_("You're about to delete the group '%s'."), LDAP::fix($this->dn)));
284         return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
285       } else {
287         /* Obviously the user isn't allowed to delete. Show message and
288            clean session. */
289         print_red (_("You are not allowed to delete this group!"));
290       }
291     }
293     /* Confirmation for deletion has been passed. Group should be deleted. */
294     if (isset($_POST['delete_group_confirm'])){
296       /* Some nice guy may send this as POST, so we've to check
297          for the permissions again. */
298       if (chkacl($this->acl, "delete") == ""){
300         /* Delete request is permitted, perform LDAP action */
301         $this->grouptab= new grouptabs($this->config,
302             $this->config->data['TABS']['GROUPTABS'], $this->dn);
303         $this->grouptab->set_acl(array($this->acl));
304         $this->grouptab->delete ();
305         gosa_log ("Group object'".$this->dn."' has been removed");
306         unset ($this->grouptab);
307         $this->grouptab= NULL;
309         /* Group list has changed, reload it. */
310         $this->reload ();
311       } else {
313         /* Normally this shouldn't be reached, send some extra
314            logs to notify the administrator */
315         print_red (_("You are not allowed to delete this group!"));
316         gosa_log ("Warning: '".$this->ui->uid."' tried to trick group deletion.");
317       }
319       /* Remove lock file after successfull deletion */
320       del_lock ($this->dn);
321       unset($_SESSION['objectinfo']);
322     }
325     /* Delete group canceled? */
326     if (isset($_POST['delete_cancel'])){
327       del_lock ($this->dn);
328       unset($_SESSION['objectinfo']);
329     }
331     /* Show tab dialog if object is present */
332     if ($this->grouptab){
333       $display= $this->grouptab->execute();
335       /* Don't show buttons if tab dialog requests this */
336       if (!$this->grouptab->by_object[$this->grouptab->current]->dialog){
337         $display.= "<p style=\"text-align:right\">\n";
338         $display.= "<input type=submit name=\"edit_finish\" value=\""._("Finish")."\">\n";
339         $display.= "&nbsp;\n";
340         $display.= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
341         $display.= "</p>";
342       }
343       return ($display);
344     }
346     /* Prepare departments */
347     $options= "";
348     foreach ($this->config->idepartments as $key => $value){
349             if ($groupfilter['depselect'] == $key){
350                     $options.= "<option selected value='$key'>$value</option>";
351             } else {
352                     $options.= "<option value='$key'>$value</option>";
353             }
354     }
356     // Managment
357     $listhead = "<div style='background:#F0F0F9;padding:5px;'>".
358       " <input type='image' class='center' src='images/list_back.png' title='"._("Go up one department")."' alt='"._("Up")."' name='dep_back'>&nbsp;".
359       " <input type='image' class='center' src='images/list_root.png' title='"._("Go to root department")."' name='dep_root' alt='"._("Root")."'>&nbsp;".
360       " <input type='image' class='center' src='images/list_home.png' title='"._("Go to users department")."' alt='"._("Home")."' name='dep_home'>&nbsp;".
361       " <img class='center' src='images/list_seperator.png' alt='' height='16' width='1'>&nbsp;".
362       " <input type='image' class='center' src='images/list_new_group.png' title='"._("Create new group")."' alt='"._("New")."' name='group_new'>&nbsp;".
363       " <img class='center' src='images/list_seperator.png' alt='' height='16' width='1'>&nbsp;".
364       _("Base")."&nbsp;<select name='depselect' onChange='mainform.submit()' class='center'>$options</select>".
365        " <input type='image' class='center' src='images/list_submit.png' title='"._("Submit department")."' name='submit_department' alt='"._("Submit")."'>&nbsp;".
366       "</div>";
368     
369     $actions = "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."' name='group_edit_%KEY%' title='"._("Edit this entry")."'>";
370     $actions.= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."' name='group_del_%KEY%' title='"._("Delete this entry")."'>";
372     // Defining Links
373     $linkopen = "<a href='?plug=".$_GET['plug']."&amp;act=dep_open&amp;dep_id=%s'>%s</a>";
375     // image Buttons 
376     $editlink = "<a href='?plug=".$_GET['plug']."&amp;id=%s&amp;act=edit_entry'>%s</a>";
377     $userimg  = "<img class='center' src='images/select_groups.png' alt='User'    title='%s'>";
379     // Extension images 
380     $posiximg = "<img class='center' src='images/select_groups.png'        alt='P'  title='"._("Posix")  ."'>";
381     $mailimg  = "<img class='center' src='images/mailto.png'             alt='M'  title='"._("Mail")   ."'>";
382     $sambaimg = "<img class='center' src='images/select_winstation.png'  alt='S'  title='"._("Samba")  ."'>";
383     $applimg  = "<img class='center' src='images/select_application.png' alt='A'  title='"._("Application")."'>"; 
384     $phoneimg = "<img class='center' src='images/select_phone.png'      alt='Ph' title='"._("Phone")  ."'>"; 
385     $envimg   = "<img class='center' src='images/smallenv.png'      alt='E' title='"._("Environment")  ."'>"; 
386     // Space
387     $empty    = "<img class='center' src='images/empty.png' style='width:16px;height:16px;' alt=''>";
390     $divlist = new divlist("groupstab");
391     $divlist->SetHeader(array(
392           array("string" => "&nbsp;", "attach" => "style='text-align:center;width:20px;'"),
393           array("string" => _("Groupname")." / "._("Department"), "attach" => "style=''"),
394           array("string" => _("Properties"), "attach" => "style='width:136px;'"),
395           array("string" => _("Actions"), "attach" => "style='width:60px;border-right:0px;text-align:right;'")
396           ));
398     $divlist->SetSummary(_("This table displays all groups, in the selected tree."));
399     $divlist->SetEntriesPerPage(0);
401     foreach($this->departments as $key=> $val){
403       if(!isset($this->config->departments[trim($key)])){
404         $this->config->departments[trim($key)]="";
405       }
407       $non_empty="";
408       $keys= str_replace("/","\/",$key);
409       foreach($this->config->departments as $keyd=>$vald ){
410         if(preg_match("/".$keys."\/.*/",$keyd)){
411           $non_empty="full";
412         }
413       }
416       $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>", "attach" => "style='text-align:center;width:20px;'");
417       $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val), "attach" => "style=''");
418       $field3 = array("string" => "&nbsp;", "attach" => "style='width:136px;'");
419       $field4 = array("string" => "&nbsp;", "attach" => "style='width:60px;border-right:0px;text-align:right;'");
421       $divlist->AddEntry(array($field1,$field2,$field3,$field4));
422     }
424     foreach($this->grouplist as $key => $val){
426       if(isset($val['objectClass'])){
427         if(in_array("posixGroup",           $val['objectClass']))   $posix = $posiximg;   else $posix   = $empty;
428         if(in_array("gosaMailAccount",      $val['objectClass']))   $mail  = $mailimg;    else $mail    = $empty;
429         if(in_array("sambaGroupMapping",    $val['objectClass']))   $samba = $sambaimg;   else $samba   = $empty;
430         if(in_array("gosaApplicationGroup", $val['objectClass']))   $appl  = $applimg;    else $appl    = $empty;
431         if(in_array("goFonPickupGroup",     $val['objectClass']))   $phone = $phoneimg;   else $phone   = $empty;
432         if(in_array("gotoEnvironment",      $val['objectClass']))   $enviro= $envimg;     else $enviro  = $empty;
433       }else{
434         $posix=$mail=$samba=$appl=$phone=$empty;
435       }
437       $title = "title='gid : ".$key." - dn : ".$val['dn']."'";
439       if(!isset($val['description'][0])){
440         $desc = "";
441       }else{
442         $desc = " - [ ".$val['description'][0]." ]";
443       }      
444       $field1 = array("string" => sprintf($userimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'");
445       $field2 = array("string" => sprintf($editlink,$key,($val['cn']['0'].$desc)), "attach" => "style='' ".$title);
446       $field3 = array("string" => $posix."&nbsp;".$enviro."&nbsp;".$mail."&nbsp;".$samba."&nbsp;".$appl."&nbsp;".$phone, "attach" => "style='width:136px;'");  
447       $field4 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:60px;border-right:0px;text-align:right;'");
448       
449       $divlist->AddEntry(array($field1,$field2,$field3,$field4));    
450     }
452     /* Show main page */
453     $smarty->assign("grouplisthead", $listhead);
454     $smarty->assign("grouplist", $divlist->DrawList());
455     $smarty->assign("search_image", get_template_path('images/search.png'));
456     $smarty->assign("searchu_image", get_template_path('images/search_user.png'));
457     $smarty->assign("tree_image", get_template_path('images/tree.png'));
458     $smarty->assign("infoimage", get_template_path('images/info.png'));
459     $smarty->assign("launchimage", get_template_path('images/launch.png'));
460     $smarty->assign("deplist", $this->config->idepartments);
461     foreach( array("depselect", "guser", "regex", "primarygroups", "mailgroups","appgroups", "sambagroups", "functionalgroups", "subsearch") as $type){
462       $smarty->assign("$type", $groupfilter[$type]);
463     }
465     /* Extend if we are not using javascript */
466     $smarty->assign("apply", apply_filter());
467     $smarty->assign("alphabet", generate_alphabet());
468     $smarty->assign("hint", print_sizelimit_warning());
469     if (isset($this->config->data['MAIN']['NOPRIMARYGROUP'])){
470       $smarty->assign("showprimary", "");
471     } else {
472       $smarty->assign("showprimary", "true");
473     }
475     return($smarty->fetch(get_template_path('headpage.tpl', TRUE)));
476   }
478   function reload($CreatePosixsList=false)
479   {
480     /* Get config */
481     $groupfilter= get_global('groupfilter');
483     /* Set base for all searches */
484     $base= $groupfilter['depselect'];
486     /* Regex filter? */
487     if ($groupfilter['regex'] != ""){
488       $regex= $groupfilter['regex'];
489     } else {
490       $regex= "*";
491     }
493     /* User filter? */
494     $filter= "(objectclass=posixGroup)";
495     $error= "";
496     $error2= "";
497     $this->grouplist= array();
499     /* What are primary groups? */
500     $primaries= array();
501     $ldap= $this->config->get_ldap_link();
502     if (!isset($this->config->data['MAIN']['NOPRIMARYGROUP'])){
503       $ldap->cd($base);
504       $ldap->search("(&(uid=$regex)(!(uid=*$))(objectClass=posixAccount)(gidNumber=*))", array("gidNumber", "cn"));
505       show_ldap_error($ldap->get_error());
506       while ($attrs= $ldap->fetch()){
507         $primaries[$attrs['gidNumber'][0]]= $attrs['cn'][0];
508       }
509     }
511     /* Set filter depending on selection */
512     $sfilter= "";
513     if ($groupfilter['appgroups'] == "checked"){
514       $filter.= "(objectClass=gosaApplicationGroup)";
515     }
516     if ($this->config->current['SAMBAVERSION'] == 3){
517       if ($groupfilter['primarygroups'] != "checked"){
518         $sfilter= "(objectClass=sambaGroupMapping)";
519       } elseif ($groupfilter['sambagroups'] == "checked"){
520         $filter.= "(objectClass=sambaGroupMapping)";
521       }
522     }
524     if ($groupfilter['mailgroups'] == "checked"){
525       $filter.= "(objectClass=gosaMailAccount)";
526     }
527     $functional= array();
528     $ldap->cd(get_groups_ou().$base);
529     $ldap->set_size_limit($_SESSION['size_limit']);
530     $ldap->search("(&(cn=$regex)(objectClass=posixGroup)(!(|(objectClass=gosaMailAccount)(objectClass=gosaApplicationGroup)$sfilter)))", array("cn", "gidNumber", "description"));
531     $error2= $ldap->error;
532     while ($attrs= $ldap->fetch()){
533       if (!isset($primaries[$attrs['gidNumber'][0]])){
534         $functional[$attrs['gidNumber'][0]]= $attrs['gidNumber'][0];
535       }
536     }
538     /*
539      * We also need to search for the departments
540      * So we are able to navigate like in konquerer
541      */
543       $res3 =  get_list2($this->ui->subtreeACL, "(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))",
544           FALSE, $base, array("ou", "description"), TRUE);
545       $this->departments= array();
546       $tmp = array();
547       foreach ($res3 as $value){
548         $tmp[strtolower($value['dn']).$value['dn']]=$value;
549       }
550       ksort($tmp);
551       foreach($tmp as $value){
552         if(isset($value["description"][0])){
553           $this->departments[$value['dn']]=convert_department_dn2($value['dn'])." - [".$value["description"][0]."]";
554         }else{
555           $this->departments[$value['dn']]= convert_department_dn2($value['dn']);//$value["description"][0];
556         }
557       }
558     /*  Ende department generation
559      */
561     /* Generate grouplist */
562     if ($filter != ""){
563       $filter= "(&(cn=$regex)(objectClass=posixGroup)(|$filter))";
564       if ($groupfilter['guser'] != ""){
565         $filter= "(&(|(memberUID=" . $groupfilter['guser'] . ")(cn=" . $groupfilter['guser'] . "))$filter)";
566       }
567     }
569     /* Depending on $CreatePosixsList we have to create different lists */
571     if ($groupfilter['subsearch'] == "checked"){
572       $res= get_list($this->ui->subtreeACL, "$filter", FALSE, $base, array("cn", "description", "gidNumber"), TRUE);
573     } else {
574       $base= get_groups_ou().$base;
575       $res= get_list($this->ui->subtreeACL, "$filter", FALSE, $base, array("cn", "description", "gidNumber"), TRUE);
576     }
577     if (preg_match("/size limit/i", $error) || preg_match("/size limit/i", $error2)){
578       $_SESSION['limit_exceeded']= TRUE;
579     }
581     foreach ($res as $value){
582       if ($groupfilter['functionalgroups'] != "checked" && isset($functional[$value['gidNumber'][0]])){
583         continue;
584       }
585       if ($groupfilter['primarygroups'] == "checked"){
586         $this->grouplist[$value['gidNumber'][0]]= $value;
587       } else {
588         if (!isset($primaries[$value['gidNumber'][0]])){
589           $this->grouplist[$value['gidNumber'][0]]= $value;
590         }
591       }
592     }
594     $tmp=array();
596     /* Create result for group management listbox*/
597     foreach($this->grouplist as $tkey => $val ){
598       $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
599     }
600     ksort($tmp);
601     $this->grouplist=array();
602     foreach($tmp as $val){
603       $this->grouplist[]=$val;
604     }
605     reset ($this->grouplist);
606   }
608   function remove_from_parent()
609   {
610     /* Optionally execute a command after we're done */
611     $this->postremove();
612   }
615   /* Save data to object */
616   function save_object()
617   {
618   }
621   /* Check values */
622   function check()
623   {
624   }
627   /* Save to LDAP */
628   function save()
629   {
630     /* Optionally execute a command after we're done */
631     $this->postcreate();
632   }
634   function adapt_from_template($dn)
635   {
636   }
638   function password_change_needed()
639   {
640   }
642   function show_header($button_text, $text, $disabled= FALSE)
643   {
644   }
646   function remove_lock()
647   {
648     if (isset($this->grouptab->dn)){
649       del_lock ($this->grouptab->dn);
650     }
651   }
655 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
656 ?>