allow to edit memberOf for Windows groups

This commit is contained in:
Roland Gruber 2015-06-07 07:43:25 +00:00
parent b74d47a709
commit 73c113554b
2 changed files with 15 additions and 1 deletions

View File

@ -7,6 +7,7 @@ June 2015
- Lamdaemon: update group of home directory if user's primary group changes
- Personal: allow to add ou=addressbook subentry for users (RFE 117)
- Unix: support auto-UID/GID with msSFU30DomainInfo
- Windows groups: support editing of member of
- LAM Pro:
-> Password Self Reset: added 389 Directory Server schema file
-> Support for groupOfMembers (RFE 121)

View File

@ -264,6 +264,7 @@ class windowsGroup extends baseModule {
'description' => _('Description'),
'info' => _('Notes'),
'member' => _('Members'),
'memberOf' => _('Member of'),
'groupType' => _('Group type'),
'groupScope' => _('Group scope'),
);
@ -907,7 +908,7 @@ class windowsGroup extends baseModule {
$this->addPDFKeyValue($return, 'managedBy', _('Managed by'), $managedBy);
}
// members
if (sizeof($this->attributes['member']) > 0) {
if (!empty($this->attributes['member'])) {
$memberList = array();
if (isset($this->attributes['member']) && is_array($this->attributes['member'])) {
$memberList = $this->attributes['member'];
@ -918,6 +919,18 @@ class windowsGroup extends baseModule {
$return[get_class($this) . '_member'][] = '<block><tr><td align=\"L\">' . $memberList[$i] . '</td></tr></block>';
}
}
// member of
if (!empty($this->attributes['memberOf'])) {
$memberOfList = array();
if (isset($this->attributes['memberOf']) && is_array($this->attributes['memberOf'])) {
$memberOfList = $this->attributes['memberOf'];
}
usort($memberOfList, 'compareDN');
$return[get_class($this) . '_memberOf'][0] = '<block><key>' . _('Member of') . '</key><tr><td align=\"L\">' . $memberOfList[0] . '</td></tr></block>';
for ($i = 1; $i < sizeof($memberOfList); $i++) {
$return[get_class($this) . '_memberOf'][] = '<block><tr><td align=\"L\">' . $memberOfList[$i] . '</td></tr></block>';
}
}
return $return;
}