From: cajus Date: Thu, 12 Jul 2007 07:19:05 +0000 (+0000) Subject: Fixed creation of rfc2307bis based admin group. Closes #98. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e83bd709c2fc62b935081ab8b568d3d2029425b5;p=gosa.git Fixed creation of rfc2307bis based admin group. Closes #98. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6840 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/setup/class_setupStep_Migrate.inc b/setup/class_setupStep_Migrate.inc index 15df31edd..059547150 100644 --- a/setup/class_setupStep_Migrate.inc +++ b/setup/class_setupStep_Migrate.inc @@ -914,6 +914,9 @@ class Step_Migrate extends setup_step if(!in_array($object_attrs['uid'][0],$attrs_admin_group_new['memberUid'])){ $attrs_admin_group_new['memberUid'][] = $object_attrs['uid'][0]; } + if ($cv['rfc2307bis']){ + $attrs_admin_group_new['member'][] = $dn; + } if($only_ldif){ $this->acl_create_changes = _("Appending user to group administrational group:")." \n"; @@ -932,7 +935,7 @@ class Step_Migrate extends setup_step } } - }else{ + } else { $group_ou = trim($cv['groupou']); if(!empty($group_ou)){ @@ -940,7 +943,12 @@ class Step_Migrate extends setup_step } $new_group_dn = "cn=GOsa Administrators,".$group_ou.$cv['base']; - $new_group_attrs['objectClass'] = array("gosaObject","posixGroup"); + if ($cv['rfc2307bis']){ + $new_group_attrs['objectClass'] = array("gosaObject","posixGroup", "groupOfNames"); + $new_group_attrs['member'][] = $dn; + } else { + $new_group_attrs['objectClass'] = array("gosaObject","posixGroup"); + } $new_group_attrs['cn'] = "GOsa Administrators"; $new_group_attrs['gosaSubtreeACL'] = ":all"; $new_group_attrs['gidNumber'] = "999"; @@ -1039,7 +1047,7 @@ class Step_Migrate extends setup_step $ldap->cd($dn); $res = $ldap->add($new_user); $this->acl_create_selected = $dn; - $this->create_admin(); + $this->create_admin(FALSE, $dn); if(!$res){ print_red($ldap->get_error()); @@ -1922,5 +1930,5 @@ class Step_Migrate extends setup_step } } -// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: +//vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>