From 4c8ae520fdfa335670d1b93c20194cac8926a624 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 14 Jun 2005 10:43:27 +0000 Subject: [PATCH] some tuning (ACL stuff, hide not needed fields) in phone setup ...... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@705 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_phoneGeneric.inc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/plugins/admin/systems/class_phoneGeneric.inc b/plugins/admin/systems/class_phoneGeneric.inc index dddc9499a..ddaeb30bf 100644 --- a/plugins/admin/systems/class_phoneGeneric.inc +++ b/plugins/admin/systems/class_phoneGeneric.inc @@ -102,18 +102,20 @@ class phoneGeneric extends plugin /* deativate all fields that are not used by the specified type */ foreach($this->attributes as $att){ - if(!in_array($att,$this->usedattrs[$this->selected_categorie])){ + if((!in_array($att,$this->usedattrs[$this->selected_categorie]))||(chkacl($this->acl,$att)!="")){ $smarty->assign($att."USED", "disabled" ); + $smarty->assign($att, ""); }else{ $smarty->assign($att."USED", "" ); + $smarty->assign($att, $this->$att); } } - + + $smarty->assign("selected_categorie",$this->selected_categorie); /* Assign attributes */ foreach ($this->attributes as $attr){ $smarty->assign($attr."ACL", chkacl($this->acl, $attr)); - $smarty->assign("$attr", $this->$attr); } $smarty->assign("base_select", $this->base); @@ -213,9 +215,16 @@ class phoneGeneric extends plugin /* Remove all unwanted attrs */ foreach($this->attributes as $att){ + + /* Check all attributes, if they are needed for this type of phone */ if(!in_array($att,$this->usedattrs[$mode])){ $this->attrs[$att] = array(); } + + /* Test rights of this user ... */ + if(chkacl($this->acl,$att)!=""){ + unset($this->attrs[$att]); + } } /* unset the categorie*/ -- 2.30.2