From b007b89cd448078a8590780fcf9bc0ee1f594642 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 1 Dec 2008 12:47:27 +0000 Subject: [PATCH] Updated group management object locking. -Allow read only access to locked objects git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13096 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../plugins/admin/groups/class_groupManagement.inc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gosa-core/plugins/admin/groups/class_groupManagement.inc b/gosa-core/plugins/admin/groups/class_groupManagement.inc index f86a9d1fd..09da2d50d 100644 --- a/gosa-core/plugins/admin/groups/class_groupManagement.inc +++ b/gosa-core/plugins/admin/groups/class_groupManagement.inc @@ -321,7 +321,7 @@ class groupManagement extends plugin /* Check locking & lock entry if required */ $user = get_lock($this->dn); if ($user != ""){ - return(gen_locked_message ($user, $this->dn)); + return(gen_locked_message ($user, $this->dn,TRUE)); } add_lock ($this->dn, $this->ui->dn); @@ -534,7 +534,12 @@ class groupManagement extends plugin /* Don't show buttons if tab dialog requests this */ if(isset($this->grouptab->by_object)){ - if (!$this->grouptab->by_object[$this->grouptab->current]->dialog){ + + if(($this->grouptab instanceOf tabs || $this->grouptab instanceOf plugin) && $this->grouptab->read_only == TRUE){ + $display.= "

+ +

"; + }elseif (!$this->grouptab->by_object[$this->grouptab->current]->dialog){ $display.= "

\n"; $display.= "\n"; $display.= " \n"; @@ -799,8 +804,7 @@ class groupManagement extends plugin { if (isset($this->grouptab->dn)){ del_lock ($this->grouptab->dn); - } - if(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){ + }elseif(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){ del_lock($this->dn); } if(isset($this->dns) && is_array($this->dns) && count($this->dns)){ -- 2.30.2