From b9bbe135001367d336d079eacd57ffd153d2ed91 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 24 Apr 2007 06:47:35 +0000 Subject: [PATCH] Shrinked down aclRole class to half size. aclRole inherits functions from class acl now. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6178 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/acl/class_aclRole.inc | 342 +--------------------------- 1 file changed, 1 insertion(+), 341 deletions(-) diff --git a/plugins/admin/acl/class_aclRole.inc b/plugins/admin/acl/class_aclRole.inc index ef54ec83f..03cc45623 100644 --- a/plugins/admin/acl/class_aclRole.inc +++ b/plugins/admin/acl/class_aclRole.inc @@ -1,6 +1,6 @@ "; - $cols= 3; - $tmp= get_global('plist'); - $plist= $tmp->info; - asort($plist); - - /* Add select all/none buttons */ - $style = "style='width:100px;'"; - - $display .= ""; - $display .= ""; - $display .= " - "; - $display .= ""; - $display .= " - "; - - $display .= ""; - $display .= ""; - - $display .= "
"; - - $style = "style='width:50px;'"; - $display .= ""; - $display .= ""; - $display .= ""; - $display .= ""; - $display .= ""; - $display .= " - "; - $display .= ""; - $display .= ""; - $display .= ""; - $display .= " - "; - - $display .= ""; - $display .= ""; - $display .= ""; - $display .= ""; - - /* Build general objects */ - $list =$this->sort_by_priority($list); - foreach ($list as $key => $name){ - - /* Create sub acl if it does not exist */ - if (!isset($this->aclContents[$key])){ - $this->aclContents[$key]= array(); - $this->aclContents[$key][0]= ''; - } - $currentAcl= $this->aclContents[$key]; - - /* Object header */ - if($_SESSION['js']) { - if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/gecko/i",$_SERVER['HTTP_USER_AGENT'])) { - $display.= "\n". - "\n ". - "\n ". - "\n ". - "\n "; - } else if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/ie/i",$_SERVER['HTTP_USER_AGENT'])) { - $display.= "\n
"._("Object").": $name". - "\n
". - "\n ". - "\n ". - "\n ". - "\n "; - } else { - $display.= "\n
"._("Object").": $name". - "\n
". - "\n ". - "\n ". - "\n "; - } - } else { - $display.= "\n
"._("Object").": $name
". - "\n ". - "\n ". - "\n "; - } - - /* Generate options */ - $spc= "  "; - if ($this->isContainer && $this->aclType != 'base'){ - $options= $this->mkchkbx($key."_0_c", _("Create objects"), preg_match('/c/', $currentAcl[0])).$spc; - $options.= $this->mkchkbx($key."_0_m", _("Move objects"), preg_match('/m/', $currentAcl[0])).$spc; - $options.= $this->mkchkbx($key."_0_d", _("Remove objects"), preg_match('/d/', $currentAcl[0])).$spc; - if ($plist[preg_replace('%^.*/%', '', $key)]['plSelfModify']){ - $options.= $this->mkchkbx($key."_0_s", _("Modifyable by owner"), preg_match('/s/', $currentAcl[0])).$spc; - } - } else { - $options= $this->mkchkbx($key."_0_m", _("Move object"), preg_match('/m/', $currentAcl[0])).$spc; - $options.= $this->mkchkbx($key."_0_d", _("Remove object"), preg_match('/d/', $currentAcl[0])).$spc; - if ($plist[preg_replace('%^.*/%', '', $key)]['plSelfModify']){ - $options.= $this->mkchkbx($key."_0_s", _("Modifyable by owner"), preg_match('/s/', $currentAcl[0])).$spc; - } - } - - /* Global options */ - $more_options= $this->mkchkbx($key."_0_r", _("read"), preg_match('/r/', $currentAcl[0])).$spc; - $more_options.= $this->mkchkbx($key."_0_w", _("write"), preg_match('/w/', $currentAcl[0])); - - $display.= "\n ". - "\n ". - "\n ". - "\n "; - - /* Walk through the list of attributes */ - $cnt= 1; - $splist= $plist[preg_replace('%^.*/%', '', $key)]['plProvidedAcls']; - asort($splist); - if($_SESSION['js']) { - if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/gecko/i",$_SERVER['HTTP_USER_AGENT'])) { - $display.= "\n ". - "\n
"._("Object").": $name
$options "._("Complete object").": $more_options
". - "\n