From a3a0edff0e530869ee017abf621835da73474a64 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 6 Dec 2006 07:25:09 +0000 Subject: [PATCH] Fixed acls && checks for conferences git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5319 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../class_phoneConferenceGeneric.inc | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc index 7c8d6c1ff..82ee473bd 100644 --- a/plugins/gofon/conference/class_phoneConferenceGeneric.inc +++ b/plugins/gofon/conference/class_phoneConferenceGeneric.inc @@ -115,12 +115,6 @@ class conference extends plugin $smarty= get_smarty(); - /* Assign base ACL */ - $baseACL = $this->getacl("base"); - if(!$this->acl_is_moveable()) { - $baseACL = preg_replace("/w/","",$baseACL); - } - $smarty->assign("baseACL", $baseACL); $tmp = $this->plInfo(); foreach($tmp['plProvidedAcls'] as $name => $translation){ @@ -140,7 +134,7 @@ class conference extends plugin foreach($_POST as $name => $value){ if(preg_match("/^chooseBase/",$name) && $once && $this->acl_is_writeable("base")){ $once = false; - $this->dialog = new baseSelectDialog($this->config,$this); + $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases()); $this->dialog->setCurrentBase($this->base); } } @@ -153,7 +147,13 @@ class conference extends plugin if($this->dialog->isClosed()){ $this->dialog = false; }elseif($this->dialog->isSelected()){ - $this->base = $this->dialog->isSelected(); + + /* A new base was selected, check if it is a valid one */ + $tmp = $this->get_allowed_bases(); + if(isset($tmp[$this->dialog->isSelected()])){ + $this->base = $this->dialog->isSelected(); + } + $this->dialog= false; }else{ return($this->dialog->execute()); @@ -204,7 +204,20 @@ class conference extends plugin { if(isset($_POST['phoneConferenceGeneric'])){ + /* Create a base backup and reset the + base directly after calling plugin::save_object(); + Base will be set seperatly a few lines below */ + $base_tmp = $this->base; plugin::save_object(); + $this->base = $base_tmp; + + /* Save base, since this is no LDAP attribute */ + $tmp = $this->get_allowed_bases(); + if(isset($_POST['base'])){ + if(isset($tmp[$_POST['base']])){ + $this->base= $_POST['base']; + } + } foreach(array("goFonConferenceOption_P","goFonConferenceOption_r","goFonConferenceOption_M","goFonConferenceOption_s", "goFonConferenceOption_i","goFonConferenceOption_c","goFonConferenceOption_D") as $attrs){ -- 2.30.2