summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-11-17 12:50:32 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-11-17 12:50:32 (GMT)
commit8c0e64e2063ab29cdd48d3147534a278d97c18d6 (patch)
tree27aa4daa72112cb02b38d0559615695e793a49d8
parentb0833fcc63d5b8d5ad94d3aff32a0af99aa06516 (diff)
downloadkolab-wap-8c0e64e2063ab29cdd48d3147534a278d97c18d6.tar.gz
Fix bug where "ou" attribute was removed from object type on save (#3823)kolab-webadmin-3.2.4
-rw-r--r--lib/client/kolab_client_task_settings.php8
-rw-r--r--public_html/js/kolab_admin.js7
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/client/kolab_client_task_settings.php b/lib/client/kolab_client_task_settings.php
index 0977599..ca9fb72 100644
--- a/lib/client/kolab_client_task_settings.php
+++ b/lib/client/kolab_client_task_settings.php
@@ -36,6 +36,8 @@ class kolab_client_task_settings extends kolab_client_task
'text-quota', 'aci', 'imap_acl',
);
+ protected $special_attributes = array('ou');
+
/**
* Default action.
@@ -871,6 +873,11 @@ class kolab_client_task_settings extends kolab_client_task
if (!empty($response['list'])) {
// remove objectClass
$attributes = array_diff($response['list'], array('objectClass'));
+
+ // add special attributes - always supported
+ $attributes = array_unique(array_merge($attributes, $this->special_attributes));
+ sort($attributes);
+
if (count($attributes)) {
$attributes = array_combine(array_map('strtolower', $attributes), $attributes);
}
@@ -883,6 +890,7 @@ class kolab_client_task_settings extends kolab_client_task
$this->output->set_env('attributes', $attributes);
$this->output->set_env('attributes_required', $required);
+ $this->output->set_env('special_attributes', $this->special_attributes);
return $attributes;
}
diff --git a/public_html/js/kolab_admin.js b/public_html/js/kolab_admin.js
index e2bc8b2..59dfc35 100644
--- a/public_html/js/kolab_admin.js
+++ b/public_html/js/kolab_admin.js
@@ -2991,6 +2991,13 @@ function kolab_admin()
required = $.map(required, function(a) { return a == 'objectClass' ? null : a; });
list = $.map(list, function(a) { return a == 'objectClass' ? null : a; });
+ // append special attributes
+ $.each(this.env.special_attributes || [], function() {
+ if ($.inArray(this, list) == -1)
+ list.push(this);
+ });
+ list.sort();
+
this.env.attributes = {};
this.env.attributes_required = required;
select.empty();