Code

Some Acl fixes / updates.
[gosa.git] / plugins / admin / acl / tabs_acl_role.inc
1 <?php
3 class aclroletab extends tabs
4 {
6   function aclroletab($config, $data, $dn)
7   {
8     $data = array(array("CLASS" => "aclrole" , "NAME" => _("ACL Templates")));
9     tabs::tabs($config, $data, $dn,"acl");
10   }
12   function save()
13   {
14     $baseobject= $this->by_object['aclrole'];
16     /* Check for new 'dn', in order to propagate the
17        'dn' to all plugins */
18     $new_dn= 'cn='.$baseobject->cn.",ou=aclroles,".$baseobject->base;
20     if ($this->dn != $new_dn){
22       /* Write entry on new 'dn' */
23       if ($this->dn != "new"){
24         $baseobject->move($this->dn, $new_dn);
25         $this->by_object['aclrole']= $baseobject;
26       }
28       /* Happen to use the new one */
29       $this->dn= $new_dn;
30     }
32     $ret= tabs::save();
34     /* Fix tagging if needed */
35     $baseobject->dn= $new_dn;
36     $baseobject->handle_object_tagging();
38     return $ret;
39   }
41   function save_object()
42   {
43     tabs::save_object();
44   }
45   
46   function execute()
47   {
48     $display= tabs::execute();
49     if(!$this->by_object['aclrole']->dialog){
50       $display.= "<p style=\"text-align:right\">\n";
51       $display.= "  <input type=submit name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
52       $display.= "  &nbsp;\n";
53       $display.= "  <input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
54       $display.= "</p>";
55     }
56     return($display);
57   }
59 }
60 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
61 ?>