From: hickert Date: Wed, 6 Dec 2006 05:18:39 +0000 (+0000) Subject: Several gofon acl updated. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c03c18d13751733fb8809eb511fd9598326e03b9;p=gosa.git Several gofon acl updated. Added some infos to snapshot template git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5306 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/ihtml/themes/default/snapshotdialog.tpl b/ihtml/themes/default/snapshotdialog.tpl index 7732258a3..1fc7cff78 100755 --- a/ihtml/themes/default/snapshotdialog.tpl +++ b/ihtml/themes/default/snapshotdialog.tpl @@ -5,6 +5,12 @@
{t}This procedure will restore a snapshot of the selected object. It will replace the existing object after pressing the restore button.{/t}
+
+{t}Remember that DNS configuration and database entries could not be restored. For some objects it is only nescessary to open and save them again (goFon), but some entries must be recreated manually (glpi).{/t} +
+
+{t}Don't forget to check references to other objects, for example does the selected printer still exists ?{/t} +

 


@@ -46,7 +52,7 @@ {t}This procedure will create a snapshot of the selected object. It will be stored inside a special branch of your directory system and can be restored later on.{/t}

-{t}Remember that the DNS configurations for this entry and possibly created zones in server extensions will not be stored in the snapshot.{/t} +{t}Remember that database entries, DNS configurations and possibly created zones in server extensions will not be stored in the snapshot.{/t}

 


diff --git a/plugins/gofon/conference/class_divListConferences.inc b/plugins/gofon/conference/class_divListConferences.inc index 339d561ae..3251d6eab 100755 --- a/plugins/gofon/conference/class_divListConferences.inc +++ b/plugins/gofon/conference/class_divListConferences.inc @@ -22,7 +22,7 @@ class divListConference extends MultiSelectWindow function divListConference ($config,$parent) { - MultiSelectWindow::MultiSelectWindow($config,"Conferences", "gofon"); + MultiSelectWindow::MultiSelectWindow($config,"Conferences", "gofonconference"); $this->parent = $parent; $this->ui = get_userinfo(); @@ -61,6 +61,7 @@ class divListConference extends MultiSelectWindow $this->AddRegex ("Regex", _("Regular expression for matching conference names"),"*" , true); } + function GenHeader() { /* Prepare departments, @@ -74,9 +75,9 @@ class divListConference extends MultiSelectWindow array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH); /* Load possible departments */ - $ui= get_userinfo(); - $tdeps= $ui->get_module_departments("gofon"); - $ids = $this->config->idepartments; + $ui = get_userinfo(); + $tdeps = $ui->get_module_departments("gofonconference"); + $ids = $this->config->idepartments; foreach($deps as $dep){ if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $tdeps)){ @@ -89,7 +90,9 @@ class divListConference extends MultiSelectWindow } } - $acls = $ui->get_permissions($this->selectedBase,"gofon/conference"); + /* Get acls */ + $acls = $ui->get_permissions($this->selectedBase,"gofonconference/conference"); + $acl_all = $ui->has_complete_category_acls($this->selectedBase,"gofonconference") ; /* NEW LIST MANAGMENT */ $listhead = "
". @@ -111,7 +114,7 @@ class divListConference extends MultiSelectWindow } /* Only display snapshot settings if we are able to write && create new entries */ - if(preg_match("/[cw]/",$acls)){ + if(preg_match("/(c.*w|w.*c)/",$acl_all)){ $listhead .= $this->get_snapshot_header($this->selectedBase); } @@ -146,7 +149,8 @@ class divListConference extends MultiSelectWindow /* Insert conferneces*/ foreach($list as $conferencekey => $conference ){ - $acl = $this->ui -> get_permissions($conference['dn'],"gofon/conference"); + $acl = $this->ui->get_permissions($conference['dn'],"gofonconference/conference"); + $acl_all = $this->ui->has_complete_category_acls($conference['dn'],"gofonconference"); /* You will need at least read access for the current conference informations to display it */ @@ -159,7 +163,7 @@ class divListConference extends MultiSelectWindow alt='"._("edit")."' name='conf_edit_%KEY%' title='"._("Edit this entry")."'>"; /* Add snapshot icon - This is allowed when we have create and write access for the current entry */ - if(preg_match("/[cw]/",$acl)){ + if(preg_match("/(c.*w|w.*c)/",$acl_all)){ $actions.= $this->GetSnapShotActions($conference['dn']); } @@ -171,7 +175,7 @@ class divListConference extends MultiSelectWindow /* Display PIN icon, only if we are the owner of the given conference */ $owner = $this->parent->ui->dn==$conference['goFonConferenceOwner'][0]; - $p_acl = $this->ui->get_permissions($conference['dn'],"gofon/conference","goFonPIN"); + $p_acl = $this->ui->get_permissions($conference['dn'],"gofonconference/conference","goFonPIN"); if((isset($conference['goFonPIN'][0])) && $owner && preg_match("/r/",$p_acl)){ $pin = "PIN"; }else{ @@ -179,7 +183,7 @@ class divListConference extends MultiSelectWindow } /* Display numer of the conference if we are allowed to view it */ - $n_acl = $this->ui->get_permissions($conference['dn'],"gofon/conference","telephoneNumber"); + $n_acl = $this->ui->get_permissions($conference['dn'],"gofonconference/conference","telephoneNumber"); if(isset($conference['telephoneNumber'][0]) && preg_match("/r/",$n_acl)){ $number = " - ".$conference['telephoneNumber'][0]; }else{ diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc index ef9f91ca1..7c8d6c1ff 100644 --- a/plugins/gofon/conference/class_phoneConferenceGeneric.inc +++ b/plugins/gofon/conference/class_phoneConferenceGeneric.inc @@ -202,7 +202,7 @@ class conference extends plugin /* Save data to object */ function save_object() { - if(isset($_POST['cn'])){ + if(isset($_POST['phoneConferenceGeneric'])){ plugin::save_object(); @@ -541,7 +541,7 @@ class conference extends plugin "plDepends" => array(), "plPriority" => 0, "plSection" => array("addons" => _("Addons")), - "plCategory" => array("gofon" => array("description" => _("GOfon"), + "plCategory" => array("gofonconference" => array("description" => _("GOfon conference"), "objectClass" => "gofonConference")), "plProvidedAcls" => array( diff --git a/plugins/gofon/conference/class_phoneConferenceManagment.inc b/plugins/gofon/conference/class_phoneConferenceManagment.inc index 58ee81d32..4084ebb9f 100644 --- a/plugins/gofon/conference/class_phoneConferenceManagment.inc +++ b/plugins/gofon/conference/class_phoneConferenceManagment.inc @@ -119,7 +119,7 @@ class phoneConferenceManagment extends plugin */ if ($s_action =="del"){ - $acl = $this->ui->get_permissions($this->conferences[$s_entry]['dn'],"gofon/conference"); + $acl = $this->ui->get_permissions($this->conferences[$s_entry]['dn'],"gofonconference/conference"); if(preg_match("/d/",$acl)){ $this->dn= $this->conferences[$s_entry]['dn']; @@ -145,7 +145,7 @@ class phoneConferenceManagment extends plugin * Finally delete department */ if (isset($_POST['delete_department_confirm'])){ - $acl = $this->ui->get_permissions($this->dn,"gofon/conference"); + $acl = $this->ui->get_permissions($this->dn,"gofonconference/conference"); if(preg_match("/d/",$acl)){ $this->remove_from_parent(); gosa_log ("Department object'".$this->dn."' has been removed"); @@ -174,7 +174,7 @@ class phoneConferenceManagment extends plugin add_lock ($this->dn, $this->ui->dn); /* Register conftab to trigger edit dialog */ - $this->conftab= new conferencetabs($this->config,$this->config->data['TABS']['CONFERENCETABS'], $this->dn,"gofon"); + $this->conftab= new conferencetabs($this->config,$this->config->data['TABS']['CONFERENCETABS'], $this->dn,"gofonconference"); $this->conftab->set_acl_base($this->dn); $_SESSION['objectinfo']= $this->dn; } @@ -188,11 +188,11 @@ class phoneConferenceManagment extends plugin if($s_action == "new" ){ $dummy_dn = "cn=dummy,ou=conferences,ou=asterisk,ou=configs,ou=systems,".$this->DivListConference->selectedBase; - $acl = $this->ui->get_permissions($dummy_dn,"gofon/conference"); + $acl = $this->ui->get_permissions($dummy_dn,"gofonconference/conference"); if(preg_match("/c/",$acl)){ /* Set up the users ACL's for this 'dn' */ $this->dn= "new"; - $this->conftab= new conferencetabs($this->config,$this->config->data['TABS']['CONFERENCETABS'], $this->dn,"gofon"); + $this->conftab= new conferencetabs($this->config,$this->config->data['TABS']['CONFERENCETABS'], $this->dn,"gofonconference"); $this->conftab->set_acl_base($dummy_dn); unset($_SESSION['objectinfo']); } @@ -306,7 +306,7 @@ class phoneConferenceManagment extends plugin $Flags |= GL_SUBSEARCH; } - $this->conferences= get_list($Filter, "gofon", $Base, $Attrs, $Flags); + $this->conferences= get_list($Filter, "gofonconference", $Base, $Attrs, $Flags); } function remove_from_parent() @@ -314,7 +314,7 @@ class phoneConferenceManagment extends plugin /* Ehm what are we doinf here ? */ $cfg = new conference($this->config, $this->dn); - $cfg->set_acl_category("gofon"); + $cfg->set_acl_category("gofonconference"); $cfg->set_acl_base($this->dn); $cfg->remove_from_parent(); diff --git a/plugins/gofon/conference/generic.tpl b/plugins/gofon/conference/generic.tpl index 75548aca2..5ba587b0a 100644 --- a/plugins/gofon/conference/generic.tpl +++ b/plugins/gofon/conference/generic.tpl @@ -218,6 +218,8 @@
+ +