From 2a336cc7a0e1d8295dcf8928a9d72f13b5c5910e Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 21 Jun 2007 13:32:47 +0000 Subject: [PATCH] Added app tab if user or group is member git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6658 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/ogroups/tabs_ogroups.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/plugins/admin/ogroups/tabs_ogroups.inc b/plugins/admin/ogroups/tabs_ogroups.inc index d0659618d..d343ddb5e 100644 --- a/plugins/admin/ogroups/tabs_ogroups.inc +++ b/plugins/admin/ogroups/tabs_ogroups.inc @@ -112,7 +112,23 @@ class ogrouptabs extends tabs $this->by_object['faiSummary']->parent= &$this; } } + + /* Add application tab if user or group is member in this object group*/ + if((preg_match("/G/",$objects) || preg_match("/U/",$objects)) && !isset($this->by_name['appgroup'])){ + $this->by_name['appgroup']= _("Application"); + $this->by_object['appgroup']= new appgroup($this->config, $this->dn); + $this->by_object['appgroup']->acl = "#all#"; + $this->by_object['appgroup']->parent= &$this; + } + + /* Remove application tab if not required any longer */ + if(!preg_match("/G/",$objects) && !preg_match("/U/",$objects) && isset($this->by_name['appgroup'])){ + $this->by_object['appgroup']->remove_from_parent(); + unset($this->by_name['appgroup']); + unset($this->by_object['appgroup']); + } + /* Move reference tab to last position*/ if(isset($this->by_name['reference'])){ $tmp = $this->by_name['reference']; -- 2.30.2