From 6b529cde34b77ba59273e46b357e4c961706c631 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 10 Nov 2005 07:47:16 +0000 Subject: [PATCH] Changed ACL handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1899 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../environment/class_environment.inc | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index d4786d57b..e3ea8c892 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -175,14 +175,35 @@ class environment extends plugin /* Call parent execute */ plugin::execute(); - /* Fill templating stuff */ - $smarty= get_smarty(); - $display= ""; - /* Is accout enabled | are we editing from usermenu or admin menu - All these tab management is done here - */ + /* Prepare all variables for smarty */ + foreach($this->attributes as $s_attr){ + /* Set value*/ + $smarty->assign($s_attr,$this->$s_attr); + + /* Set checkbox state*/ + if(empty($this->$s_attr)){ + $smarty->assign($s_attr."CHK",""); + }else{ + $smarty->assign($s_attr."CHK"," checked "); + } + + /* Prepare ACL settings*/ + if(chkacl($this->acl,$s_attr)=="") { + $smarty->assign($s_attr."ACL",""); + }else{ + $smarty->assign($s_attr."ACL"," disabled "); + } + + } + + /* Fill templating stuff */ + $smarty= get_smarty(); + $display= ""; + /* Is accout enabled | are we editing from usermenu or admin menu + All these tab management is done here + */ - /* Working from Usermenu an the Account is currently disbled + /* Working from Usermenu an the Account is currently disbled * this->parent : is only set if we are working in a list of tabs * is_account : is only true if the needed objectClass is given */ -- 2.30.2