Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117780126
D24.1775246577.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D24.1775246577.diff
View Options
diff --git a/lib/kolab_api_service.php b/lib/kolab_api_service.php
--- a/lib/kolab_api_service.php
+++ b/lib/kolab_api_service.php
@@ -110,6 +110,29 @@
return key($object_types);
}
+ // Get the domain information for expansion later
+ $auth = Auth::get_instance();
+ $domain_info = $auth->domain_info($_SESSION['user']->get_domain());
+ $domain_info = $domain_info[key($domain_info)];
+ $dna = $this->conf->get('domain_name_attribute');
+
+ if (empty($dna)) {
+ $dna = 'associateddomain';
+ }
+
+ $domain = $domain_info[$dna];
+ if (is_array($domain)) {
+ $domain = $domain[0];
+ }
+
+ $dba = 'inetdomainbasedn';
+
+ if (empty($domain_info[$dba])) {
+ $base_dn = 'dc=' . implode('dc=,', explode('.', $domain));
+ } else {
+ $base_dn = $domain_info[$dba];
+ }
+
$object_class = array_map('strtolower', $object_class);
$object_keys = array_diff(array_keys($attributes), array(self::unique_attribute()));
$keys_count = count($object_keys);
@@ -155,13 +178,31 @@
// Static attributes score
$elem_values_score = 0;
foreach ((array) $elem['attributes']['fields'] as $attr => $value) {
+ // Skip the object classes we have already compared
+ if ($attr == "objectclass") {
+ continue;
+ }
+
$v = $attributes[$attr];
+
if (is_array($value)) {
+ foreach (array_values($value) as $_value) {
+ $_value = $this->conf->expand($_value, $custom = Array('base_dn' => $base_dn));
+
+ if (in_array($_value, $v)) {
+ $elem_values_score++;
+ }
+ }
+
$value = implode('', $value);
+ } else {
+ $value = $this->conf->expand($_value, $custom = Array('base_dn' => $base_dn));
}
+
if (is_array($v)) {
$v = implode('', $v);
}
+
$elem_values_score += intval($v == $value);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 8:02 PM (5 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18826228
Default Alt Text
D24.1775246577.diff (2 KB)
Attached To
Mode
D24: Allow values of attributes defined to be expanded and as such, match between the configured user type and the LDAP object entry (T496)
Attached
Detach File
Event Timeline