From 572deeaec5d4d3e532c49c817983a52c0c0f49c1 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 16 Nov 2006 04:26:27 +0000 Subject: [PATCH] added group C&P fixes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5131 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/groups/class_groupGeneric.inc | 2 ++ plugins/admin/groups/class_groupMail.inc | 16 ++++++++++++++-- plugins/admin/groups/paste_generic.tpl | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc index a03f6a91e..fa5924297 100644 --- a/plugins/admin/groups/class_groupGeneric.inc +++ b/plugins/admin/groups/class_groupGeneric.inc @@ -44,6 +44,8 @@ class group extends plugin var $attributes= array("cn", "description", "gidNumber","memberUid","sambaGroupType","sambaSID"); var $objectclasses= array("top", "posixGroup"); + var $CopyPasteVars = array("force_gid","fon_group","smbgroup","groupType","sambaSID","sambaDomainName","SID","nagios_group","sambaGroupType"); + function group ($config, $dn= NULL) { plugin::plugin ($config, $dn); diff --git a/plugins/admin/groups/class_groupMail.inc b/plugins/admin/groups/class_groupMail.inc index 13b378c3c..f836f5281 100644 --- a/plugins/admin/groups/class_groupMail.inc +++ b/plugins/admin/groups/class_groupMail.inc @@ -9,6 +9,7 @@ class mailgroup extends plugin var $uid = ""; // User id var $cn = ""; // cn + var $orig_cn = ""; // cn var $method = "mailMethod"; // Used Mail method var $mmethod = ""; // Contains the gosa.conf MAILMETHOD @@ -54,7 +55,7 @@ class mailgroup extends plugin "acl","gosaSharedFolderTarget", "gosaVacationMessage"); var $objectclasses= array("gosaMailAccount"); - + var $CopyPasteVars = array("quotaUsage","imapacl"); function mailgroup ($config, $dn= NULL, $ui= NULL) { @@ -62,6 +63,8 @@ class mailgroup extends plugin */ plugin::plugin($config, $dn); + $this->orig_cn = $this->cn; + /* Set mailMethod to the one defined in gosa.conf */ if (isset($this->config->current['MAILMETHOD'])){ @@ -881,7 +884,7 @@ I: Only insider delivery */ } $ldap->cd($this->config->current['BASE']); $ldap->search ("(&(!(objectClass=gosaUserTemplate))(objectClass=gosaMailAccount)(|(mail=".$this->mail.")(gosaMailAlternateAddress=". - $this->mail."))(!(uid=".$this->cn."))(!(cn=".$this->cn.")))"); + $this->mail."))(!(uid=".$this->orig_cn."))(!(cn=".$this->orig_cn.")))"); if ($ldap->count() != 0){ $message[]= _("The primary address you've entered is already in use."); } @@ -1047,6 +1050,15 @@ I: Only insider delivery */ } + function PrepareForCopyPaste($source) + { + plugin::PrepareForCopyPaste($source); + + /* Reset alternate mail addresses */ + $this->gosaMailAlternateAddress = array(); + } + + /* Return plugin informations for acl handling */ function plInfo() { diff --git a/plugins/admin/groups/paste_generic.tpl b/plugins/admin/groups/paste_generic.tpl index 6b98184b2..f08d24315 100644 --- a/plugins/admin/groups/paste_generic.tpl +++ b/plugins/admin/groups/paste_generic.tpl @@ -11,7 +11,7 @@ + onclick='changeState("gidNumber")'> -- 2.30.2