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

Merge branch '5135-filter-enhancement-and-management-refactor' into '1.4-dev'

Resolve "filter enhancement and management refactor"

See merge request fusiondirectory/fd!514
parents 44565e55 cfba298b
......@@ -36,9 +36,10 @@ class selectManagement extends management
array('LinkColumn', array('attributes' => 'description', 'label' => 'Description')),
);
function __construct($objectTypes = FALSE, $multiSelect = TRUE)
function __construct($objectTypes = FALSE, $multiSelect = TRUE, $neededAttrs = array())
{
$this->multiSelect = $multiSelect;
$this->neededAttrs = $neededAttrs;
$this->multiSelect = $multiSelect;
parent::__construct($objectTypes);
}
......
......@@ -509,7 +509,15 @@ class ObjectsAttribute extends GenericDialogAttribute
function __construct ($label, $description, $ldapName, $required, array $objectTypes, $defaultValue = array(), $store_attr = 'dn', $display_attr = 'cn', $acl = '')
{
parent::__construct($label, $description, $ldapName, $required, $defaultValue, $store_attr, $display_attr, $acl);
$this->selectManagementParameters = array($objectTypes, TRUE);
$this->selectManagementParameters = array(
$objectTypes,
TRUE,
array(
'objectClass' => '*',
$store_attr => (($store_attr == 'dn') ? 'raw' : 1),
$display_attr => (($display_attr == 'dn') ? 'raw' : 1),
)
);
}
}
......@@ -537,11 +545,14 @@ class UsersGroupsRolesAttribute extends ObjectsAttribute
function __construct ($label, $description, $ldapName, $required = FALSE, $defaultValue = array(), $store_attr = 'dn', $display_attr = 'cn', $acl = '')
{
parent::__construct($label, $description, $ldapName, $required, array('user', 'group', 'role', 'ogroup'), $defaultValue, $store_attr, $display_attr, $acl);
$this->selectManagementParameters[2]['cn'] = 1;
$this->selectManagementParameters[2]['uid'] = 1;
$this->selectManagementParameters[2]['objectClass'] = '*';
}
protected function ldapAttributesToGet ()
{
return array('cn', 'uid', 'objectClass');
return array_unique(array($store_attr, $display_attr, 'cn', 'uid', 'objectClass'));
}
protected function fillDisplayValueFrom ($i, $attrs)
......
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