Commit f64e184c authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #4687 ACL assignments can’t be done with object groups

parent 3432456e
......@@ -107,6 +107,12 @@ class userinfo
$ldap->cd($this->config->current['BASE']);
/* Get member groups... */
$ldap->search('(&(objectClass=groupOfNames)(member='.ldap_escape_f($this->dn).'))', array('dn'));
while ($attrs = $ldap->fetch()) {
$this->groups[$attrs['dn']] = $attrs['dn'];
}
/* Get member POSIX groups... */
$ldap->search('(&(objectClass=posixGroup)(memberUid='.ldap_escape_f($this->uid).'))', array('dn'));
while ($attrs = $ldap->fetch()) {
$this->groups[$attrs['dn']] = $attrs['dn'];
......@@ -202,7 +208,7 @@ class userinfo
}
}
/* Create an array which represenet all relevant permissions settings
/* Create an array which represent all relevant permissions settings
per dn.
The array will look like this:
......
......@@ -26,6 +26,6 @@ class userGroupSelect extends userSelect
class userGroupRoleSelect extends userGroupSelect
{
protected $objectTypes = array('user', 'group', 'role');
protected $objectTypes = array('user', 'group', 'role', 'ogroup');
}
?>
......@@ -412,9 +412,11 @@ class UsersGroupsAttribute extends GenericDialogAttribute
if ($this->display_attr == 'dn') {
$this->displays[$i] = $attrs['dn'];
} elseif (in_array('posixGroup', $attrs['objectClass'])) {
$this->displays[$i] = sprintf(_('Group %s'), trim($attrs['cn'][0]));
$this->displays[$i] = sprintf(_('POSIX group %s'), trim($attrs['cn'][0]));
} elseif (in_array('organizationalRole', $attrs['objectClass'])) {
$this->displays[$i] = sprintf(_('Role %s'), trim($attrs['cn'][0]));
} elseif (in_array('groupOfNames', $attrs['objectClass'])) {
$this->displays[$i] = sprintf(_('Group %s'), trim($attrs['cn'][0]));
} elseif (isset($attrs['uid'][0])) {
$this->displays[$i] = trim($attrs['uid'][0]);
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment