From: hickert Date: Tue, 5 May 2009 11:47:45 +0000 (+0000) Subject: Applied patch to allow selecting the primary Group when copying users X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d1ba351cafc66dddd9a1c6917bd2a4117d91f0b8;p=gosa.git Applied patch to allow selecting the primary Group when copying users git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@13600 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc index 085146744..7ac1e1a26 100644 --- a/plugins/personal/posix/class_posixAccount.inc +++ b/plugins/personal/posix/class_posixAccount.inc @@ -1201,6 +1201,10 @@ class posixAccount extends plugin $this->is_modified= TRUE; } $this->force_ids= $data; + $this->primaryGroup= $_POST['primaryGroup']; + if ($this->primaryGroup != 0){ + $this->gidNumber= $this->primaryGroup; + } } } @@ -1253,7 +1257,9 @@ class posixAccount extends plugin /* Assigned informations to smarty */ $smarty = get_smarty(); + $smarty->assign("secondaryGroups",$this->secondaryGroups); $smarty->assign("homeDirectory",$this->homeDirectory); + $smarty->assign("primaryGroup",$this->primaryGroup); $smarty->assign("uidNumber",$this->uidNumber); $smarty->assign("gidNumber",$this->gidNumber); $smarty->assign("forceMode",$forceMode); @@ -1285,6 +1291,9 @@ class posixAccount extends plugin /* Avoid using the same gid/uid number as source user */ $this->savedUidNumber = $this->get_next_id("uidNumber", $this->dn); $this->savedGidNumber = $this->get_next_id("gidNumber", $this->dn); + + /* Fill group */ + $this->primaryGroup= $source->gidNumber; } function convertToSeconds($val) diff --git a/plugins/personal/posix/paste_generic.tpl b/plugins/personal/posix/paste_generic.tpl index 5f07cb7b3..a7f8ad12d 100644 --- a/plugins/personal/posix/paste_generic.tpl +++ b/plugins/personal/posix/paste_generic.tpl @@ -11,6 +11,14 @@ + + + + + +