From 048ba03fb758bb9fab27da8719b0817811b958d3 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 25 Jun 2007 07:29:58 +0000 Subject: [PATCH] Added envrironment to ogroups git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6673 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/ogroups/tabs_ogroups.inc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugins/admin/ogroups/tabs_ogroups.inc b/plugins/admin/ogroups/tabs_ogroups.inc index 7575a134e..57d388751 100644 --- a/plugins/admin/ogroups/tabs_ogroups.inc +++ b/plugins/admin/ogroups/tabs_ogroups.inc @@ -127,6 +127,20 @@ class ogrouptabs extends tabs unset($this->by_object['appgroup']); } + /* Add environment tab if user or group is member in this object group*/ + if((preg_match("/G/",$objects) || preg_match("/U/",$objects)) && !isset($this->by_name['environment'])){ + $this->by_name['environment']= _("Environment"); + $this->by_object['environment']= new environment($this->config, $this->dn); + $this->by_object['environment']->acl = "#all#"; + $this->by_object['environment']->parent= &$this; + } + + /* Remove environment tab if not required any longer */ + if(!preg_match("/G/",$objects) && !preg_match("/U/",$objects) && isset($this->by_name['environment'])){ + $this->by_object['environment']->remove_from_parent(); + unset($this->by_name['environment']); + unset($this->by_object['environment']); + } /* Move reference tab to second position from right */ if(isset($this->by_name['acl'])){ $tmp = $this->by_name['acl']; -- 2.30.2