From: hickert Date: Mon, 25 Jun 2007 07:27:08 +0000 (+0000) Subject: Added environment to ogroup tabs X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=537865c42013d811862964645c952f4cbbad1f8f;p=gosa.git Added environment to ogroup tabs git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6672 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/ogroups/tabs_ogroups.inc b/plugins/admin/ogroups/tabs_ogroups.inc index d343ddb5e..8fa60234b 100644 --- a/plugins/admin/ogroups/tabs_ogroups.inc +++ b/plugins/admin/ogroups/tabs_ogroups.inc @@ -127,7 +127,23 @@ class ogrouptabs extends tabs unset($this->by_name['appgroup']); 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 last position*/ if(isset($this->by_name['reference'])){